apply const specifiers. 25/95025/2
authorHermet Park <hermet@hermet.pe.kr>
Wed, 2 Nov 2016 06:37:12 +0000 (15:37 +0900)
committerHermet Park <hermet@hermet.pe.kr>
Wed, 2 Nov 2016 06:42:43 +0000 (15:42 +0900)
Change-Id: Ifd6b7969c699ebdad05dde3f7b630222593ecfc2

25 files changed:
src/include/efl/UiBaseView.h
src/include/efl/UiBaseViewmgr.h
src/include/efl/mobile/UiMenu.h
src/include/efl/mobile/UiPopup.h
src/include/efl/mobile/UiStandardView.h
src/include/efl/mobile/UiView.h
src/include/efl/mobile/c/ui_menu.h
src/include/efl/mobile/c/ui_popup.h
src/include/efl/mobile/c/ui_standard_view.h
src/include/efl/mobile/c/ui_view.h
src/include/interface/UiIfaceOverlay.h
src/include/interface/UiIfaceRotatable.h
src/include/interface/UiIfaceView.h
src/lib/efl/UiBaseView.cpp
src/lib/efl/UiBaseViewmgr.cpp
src/lib/efl/mobile/UiMenu.cpp
src/lib/efl/mobile/UiPopup.cpp
src/lib/efl/mobile/UiStandardView.cpp
src/lib/efl/mobile/UiView.cpp
src/lib/efl/mobile/c/ui_menu.cpp
src/lib/efl/mobile/c/ui_popup.cpp
src/lib/efl/mobile/c/ui_standard_view.cpp
src/lib/efl/mobile/c/ui_view.cpp
src/lib/interface/UiIfaceOverlay.cpp
src/lib/interface/UiIfaceView.cpp

index a0c188cc90d8f7b41f67be993c9662c9dc9ab2bd..0393f675caf3074c360d3f667880189ee96a2224 100644 (file)
@@ -69,7 +69,7 @@ public:
         *
         *  @return The base object of view
         */
-       virtual Eo *getBase();
+       virtual Eo *getBase() const;
 
        /**
         *  @brief Set the indicator mode.
@@ -106,7 +106,7 @@ public:
         *
         *  @return Current rotation degree, -1 if it fails to get degree information
         */
-       virtual int getDegree() override;
+       virtual int getDegree() const override;
 
 protected:
        /**
@@ -116,7 +116,7 @@ protected:
         *
         *  @return The base layout object of viewmgr.
         */
-       Eo *getParent();
+       Eo *getParent() const;
 
        /**
         *  @brief Toggle event block.
index ebe4bed13dd654f93457579ba313ea124b0625cc..6c2268494c3ca359aeae1f56da39e5f2198e4aeb 100644 (file)
@@ -204,7 +204,7 @@ public:
         *
         *  @return The base object of this viewmgr.
         */
-       Eo *getBase();
+       Eo *getBase() const;
 
 protected:
        /**
index 692ad394d322cf70c62b34489350e7ab6a3c4770..b77fc39f32e22dfbbae53ccf894cd9e4701bdc42 100644 (file)
@@ -91,7 +91,7 @@ public:
         *  @see activate()
         *  @see deactivate()
         */
-       virtual bool isActivated() override;
+       virtual bool isActivated() const override;
 
        /**
         *  @brief Gets a base object of menu.
@@ -99,14 +99,14 @@ public:
         *
         *  @return base object of menu
         */
-       virtual Eo *getBase();
+       virtual Eo *getBase() const;
 
        /**
         *  @brief Get a current menu's degree.
         *
         *  @return Current rotation degree, -1 if it fails to get degree information.
         */
-       virtual int getDegree() override;
+       virtual int getDegree() const override;
 
 protected:
        /**
@@ -124,7 +124,7 @@ protected:
         *
         *  @return viewmgr's window object.
         */
-       Elm_Win *getWindow();
+       Elm_Win *getWindow() const;
 
 public:
        _UI_DISABLE_DEFAULT_CTOR(UiMenu);
index 333432587c66805c9b85475fc6b5b1c8313172a9..28b04495357474bb14858f1eb544fdd7f3dd69ad 100644 (file)
@@ -105,7 +105,7 @@ public:
         *  @see activate()
         *  @see deactivate()
         */
-       virtual bool isActivated() override;
+       virtual bool isActivated() const override;
 
        /**
         *  @brief Gets a base object of popup.
@@ -113,14 +113,14 @@ public:
         *
         *  @return base object of popup
         */
-       virtual Eo *getBase();
+       virtual Eo *getBase() const;
 
        /**
         *  @brief Get current popup's degree.
         *
         *  @return Current rotation degree, -1 if it fails to get degree information.
         */
-       virtual int getDegree() override;
+       virtual int getDegree() const override;
 
 protected:
        /**
@@ -128,7 +128,7 @@ protected:
         *
         *  @return viewmgr's window object.
         */
-       virtual Elm_Win *getWindow();
+       virtual Elm_Win *getWindow() const;
 
 public:
        _UI_DISABLE_DEFAULT_CTOR(UiPopup);
index c2e3bb0328dff11fd6edadc3d6ff5c23ad5907a8..0c918a918f3674cbf26309579dec0965b02db209 100644 (file)
@@ -205,7 +205,7 @@ public:
         *  @see setTitleLeftBtn()
         *  @see unsetTitleLeftBtn()
         */
-       Elm_Button *getTitleLeftBtn();
+       Elm_Button *getTitleLeftBtn() const;
 
        /**
         *  @brief Returns a title right button of the view.
@@ -215,7 +215,7 @@ public:
         *  @see setTitleRightBtn()
         *  @see unsetTitleRightBtn()
         */
-       Elm_Button *getTitleRightBtn();
+       Elm_Button *getTitleRightBtn() const;
 
        /**
         *  @brief Returns a toolbar of the view.
@@ -225,14 +225,14 @@ public:
         *  @see setToolbar()
         *  @see unsetToolbar()
         */
-       Elm_Toolbar *getToolbar();
+       Elm_Toolbar *getToolbar() const;
 
        /**
         *  @brief Get a base layout of viewmgr.
         *
         *  @return viewmgr's base layout object.
         */
-       virtual Eo *getBase() override;
+       virtual Eo *getBase() const override;
 
 protected:
        /**
index 5abc1fd1456b9bd6732d56df7fd8ca789481809e..72c7172735894e8300ac9c18aaf0186be7f88fb2 100644 (file)
@@ -59,7 +59,7 @@ public:
         *
         *  @return The menu object that connected with this view. If it doesn't, @c nullptr will be returned.
         */
-       const UiMenu *getMenu();
+       const UiMenu *getMenu() const;
 
        /**
         *  @brief Gets current view's orientation mode.
@@ -68,7 +68,7 @@ public:
         *
         *  @see UiViewOrientationMode
         */
-       virtual UiViewOrientationMode getOrientationMode() override;
+       virtual UiViewOrientationMode getOrientationMode() const override;
 
 protected:
        /**
index 14808ae11ca7675978f0049e861ca802e10f3680..21234ed4b345ee011d60ba5b8e8a04883bcd4533 100644 (file)
@@ -44,7 +44,7 @@ EAPI int ui_menu_set_content(ui_menu *menu, Elm_Ctxpopup *content);
  * @see ui_menu_unset_content()
  * @see get_last_result()
  */
-EAPI Elm_Ctxpopup *ui_menu_get_content(ui_menu *menu);
+EAPI Elm_Ctxpopup *ui_menu_get_content(const ui_menu *menu);
 
 /**
  * @brief Unsets an ui_menu content.
@@ -112,7 +112,7 @@ EAPI int ui_menu_deactivate(ui_menu *menu);
  * @see ui_menu_deactivate()
  * @see get_last_result()
  */
-EAPI bool ui_menu_get_activated(ui_menu *menu);
+EAPI bool ui_menu_get_activated(const ui_menu *menu);
 
 /**
  * @brief Gets a base object of an ui_menu.
@@ -129,7 +129,7 @@ EAPI bool ui_menu_get_activated(ui_menu *menu);
  *
  * @see get_last_result()
  */
-EAPI Eo *ui_menu_get_base(ui_menu *menu);
+EAPI Eo *ui_menu_get_base(const ui_menu *menu);
 
 /**
  * @brief Gets a current ui_menu's degree.
@@ -145,7 +145,7 @@ EAPI Eo *ui_menu_get_base(ui_menu *menu);
  *
  * @see get_last_result()
  */
-EAPI int ui_menu_get_degree(ui_menu *menu);
+EAPI int ui_menu_get_degree(const ui_menu *menu);
 
 /**
  * @brief Returns a view which is matched with this ui_menu.
@@ -161,7 +161,7 @@ EAPI int ui_menu_get_degree(ui_menu *menu);
  *
  * @see get_last_result()
  */
-EAPI ui_view *ui_menu_get_view(ui_menu *menu);
+EAPI ui_view *ui_menu_get_view(const ui_menu *menu);
 
 /**
  * @}
index 8239f795c9c95e95824b6f8981d7e8de6c58e3bf..5e76ef958cf2b0f589c5b20481d3a750f590516f 100644 (file)
@@ -78,7 +78,7 @@ EAPI int ui_popup_set_content(ui_popup *popup, Elm_Popup *content);
  * @see ui_popup_unset_content()
  * @see get_last_result()
  */
-EAPI Elm_Popup *ui_popup_get_content(ui_popup *popup);
+EAPI Elm_Popup *ui_popup_get_content(const ui_popup *popup);
 
 /**
  * @brief Unsets an ui_popup content.
@@ -148,7 +148,7 @@ EAPI int ui_popup_deactivate(ui_popup *popup);
  * @see ui_popup_deactivate()
  * @see get_last_result()
  */
-EAPI bool ui_popup_get_activated(ui_popup *popup);
+EAPI bool ui_popup_get_activated(const ui_popup *popup);
 
 /**
  * @brief Gets a base object of an ui_popup.
@@ -165,7 +165,7 @@ EAPI bool ui_popup_get_activated(ui_popup *popup);
  *
  * @see get_last_result()
  */
-EAPI Eo *ui_popup_get_base(ui_popup *popup);
+EAPI Eo *ui_popup_get_base(const ui_popup *popup);
 
 /**
  * @brief Gets current ui_popup's degree.
@@ -181,7 +181,7 @@ EAPI Eo *ui_popup_get_base(ui_popup *popup);
  *
  * @see get_last_result()
  */
-EAPI int ui_popup_get_degree(ui_popup *popup);
+EAPI int ui_popup_get_degree(const ui_popup *popup);
 
 /**
  * @brief Returns a view which is matched with the ui_popup.
@@ -197,7 +197,7 @@ EAPI int ui_popup_get_degree(ui_popup *popup);
  *
  * @see get_last_result()
  */
-EAPI ui_view *ui_popup_get_view(ui_popup *popup);
+EAPI ui_view *ui_popup_get_view(const ui_popup *popup);
 
 /**
  * @}
index e97377a4c5fee47ca68e41e2298208ba656ad934..bd645f82eabff198f80f9f72192abeb0729e8ca6 100644 (file)
@@ -112,7 +112,7 @@ EAPI int ui_standard_view_set_title_right_btn(ui_standard_view *view, Elm_Button
  * @see ui_standard_view_unset_title_right_btn()
  * @see get_last_result()
  */
-EAPI Elm_Button *ui_standard_view_get_title_right_btn(ui_standard_view *view);
+EAPI Elm_Button *ui_standard_view_get_title_right_btn(const ui_standard_view *view);
 
 /**
  * @brief Unsets a title right button of title area.
@@ -167,7 +167,7 @@ EAPI int ui_standard_view_set_title_left_btn(ui_standard_view *view, Elm_Button
  * @see ui_standard_view_unset_title_left_btn()
  * @see get_last_result()
  */
-EAPI Elm_Button *ui_standard_view_get_title_left_btn(ui_standard_view *view);
+EAPI Elm_Button *ui_standard_view_get_title_left_btn(const ui_standard_view *view);
 
 /**
  * @brief Unsets a title left button of title area.
@@ -223,7 +223,7 @@ EAPI int ui_standard_view_set_toolbar(ui_standard_view *view, Elm_Toolbar *toolb
  * @see ui_standard_view_unset_toolbar()
  * @see get_last_result()
  */
-EAPI Elm_Toolbar *ui_standard_view_get_toolbar(ui_standard_view *view);
+EAPI Elm_Toolbar *ui_standard_view_get_toolbar(const ui_standard_view *view);
 
 /**
  * @brief Unsets a toolbar.
index 56bff072d4f0b2e07a3cf4f1f371378c2e59b4af..d2c323ee3197f507f6f1bf6f8b68f5822d7062c3 100644 (file)
@@ -112,7 +112,7 @@ EAPI int ui_view_set_content(ui_view *view, Eo *content);
  * @see ui_view_unset_content()
  * @see get_last_result()
  */
-EAPI Eo *ui_view_get_content(ui_view *view);
+EAPI Eo *ui_view_get_content(const ui_view *view);
 
 /**
  * @brief Unsets a ui_view content.
@@ -164,7 +164,7 @@ EAPI int ui_view_set_event_cb(ui_view *view, ui_view_event_type_e event_type, ui
  *
  * @see get_last_result()
  */
-EAPI Eo* ui_view_get_base(ui_view *view);
+EAPI Eo* ui_view_get_base(const ui_view *view);
 
 /**
  * @brief Sets the indicator mode of a ui_view.
@@ -198,7 +198,7 @@ EAPI int ui_view_set_indicator(ui_view *view, ui_view_indicator indicator);
  * @see ui_view_get_indicator()
  * @see get_last_result()
  */
-EAPI ui_view_indicator ui_view_get_indicator(ui_view *view);
+EAPI ui_view_indicator ui_view_get_indicator(const ui_view *view);
 
 /**
  * @brief Sets the array of view's available rotations.
@@ -236,7 +236,7 @@ EAPI int ui_view_set_available_rotations(ui_view *view, const int *rotations, un
  * @see ui_view_set_available_rotations()
  * @see get_last_result()
  */
-EAPI const int *ui_view_get_available_rotations(ui_view *view, unsigned int *count);
+EAPI const int *ui_view_get_available_rotations(const ui_view *view, unsigned int *count);
 
 /**
  * @brief Sets content removable.
@@ -270,7 +270,7 @@ EAPI int ui_view_set_removable_content(ui_view *view, bool remove);
  * @see ui_view_get_removable_content()
  * @see get_last_result()
  */
-EAPI bool ui_view_get_removable_content(ui_view *view);
+EAPI bool ui_view_get_removable_content(const ui_view *view);
 
 /**
  * @brief Gets the current view's degree.
@@ -286,7 +286,7 @@ EAPI bool ui_view_get_removable_content(ui_view *view);
  *
  * @see get_last_result()
  */
-EAPI int ui_view_get_degree(ui_view *view);
+EAPI int ui_view_get_degree(const ui_view *view);
 
 /**
  * @brief Gets current view's orientation mode.
@@ -303,7 +303,7 @@ EAPI int ui_view_get_degree(ui_view *view);
  * @see ui_view_orientation_mode
  * @see get_last_result()
  */
-EAPI ui_view_orientation_mode ui_view_get_orientation_mode(ui_view *view);
+EAPI ui_view_orientation_mode ui_view_get_orientation_mode(const ui_view *view);
 
 /**
  * @brief Sets transition style of a view.
@@ -339,7 +339,7 @@ EAPI int ui_view_set_transition_style(ui_view *view, const char *style);
  * @see ui_view_set_transition_style()
  * @see get_last_result()
  */
-EAPI const char *ui_view_get_transition_style(ui_view *view);
+EAPI const char *ui_view_get_transition_style(const ui_view *view);
 
 /**
  * @brief Gets a ui_menu instance.
@@ -355,7 +355,7 @@ EAPI const char *ui_view_get_transition_style(ui_view *view);
  *
  * @get_last_result()
  */
-EAPI ui_menu *ui_view_get_menu(ui_view *view);
+EAPI ui_menu *ui_view_get_menu(const ui_view *view);
 
 /**
  * @brief Returns a name of this view.
@@ -371,7 +371,7 @@ EAPI ui_menu *ui_view_get_menu(ui_view *view);
  *
  * @get_last_result()
  */
-EAPI const char *ui_view_get_name(ui_view *view);
+EAPI const char *ui_view_get_name(const ui_view *view);
 
 /**
  * @brief Returns a state of this view.
@@ -388,7 +388,7 @@ EAPI const char *ui_view_get_name(ui_view *view);
  * @see ui_view_state
  * @see get_last_result()
  */
-EAPI ui_view_state ui_view_get_state(ui_view *view);
+EAPI ui_view_state ui_view_get_state(const ui_view *view);
 
 /**
  * @brief Destroys an ui_view.
index f8448f6a2c2fd4086db845046d83879fec30cafd..44b831169937d4548314996b01838d0654d51910 100644 (file)
@@ -96,14 +96,14 @@ public:
         *  @see activate()
         *  @see deactivate()
         */
-       virtual bool isActivated() = 0;
+       virtual bool isActivated() const = 0;
 
        /**
         *  @brief Return a view which is matched with the overlay.
         *
         *  @return The view which is matched with overlay.
         */
-       UiIfaceView *getView();
+       UiIfaceView *getView() const;
 
        /**
         *  @brief Returns a content of overlay.
@@ -113,7 +113,7 @@ public:
         *  @see setContent()
         *  @see unsetContent()
         */
-       virtual T getContent();
+       virtual T getContent() const;
 
 protected:
        /**
index cf18a2b1fe31bbb5c75d381d3e6423dfd64276a1..f9fd2db2293e9bc83c292a70464865cae40f071f 100644 (file)
@@ -37,14 +37,14 @@ public:
         *
         *  @return Current rotation degree, -1 if it fails to get degree information.
         */
-       virtual int getDegree() { return 0; }
+       virtual int getDegree() const { return 0; }
 
        /**
         *  @brief Get current view's orientation mode.
         *
         *  @return Current orientation mode, one of #UiViewOrientationMode.
         */
-       virtual UiViewOrientationMode getOrientationMode() { return UI_VIEW_ORIENTATION_MODE_UNKNOWN; }
+       virtual UiViewOrientationMode getOrientationMode() const { return UI_VIEW_ORIENTATION_MODE_UNKNOWN; }
 
 protected:
        /**
index 9915df8f340fa62e51c39d3afdad90e44a8edd52..204863cb419f906a506c4c12e5f5608e24988228 100644 (file)
@@ -124,7 +124,7 @@ public:
         *  @see setAvailableRotations
         *  @see get_last_result()
         */
-       const int *getAvailableRotations(unsigned int *count);
+       const int *getAvailableRotations(unsigned int *count) const;
 
        /**
         *  @brief Returns a style name of this view.
@@ -133,14 +133,14 @@ public:
         *
         *  @see setTransitionStyle()
         */
-       const char *getTransitionStyle();
+       const char *getTransitionStyle() const;
 
        /**
         *  @brief Returns a name of this view.
         *
         *  @return name of view
         */
-       const char *getName();
+       const char *getName() const;
 
        /**
         *  @brief Returns a content of this view.
@@ -150,7 +150,7 @@ public:
         *  @see setContent()
         *  @see unsetContent()
         */
-       T getContent();
+       T getContent() const;
 
        /**
         *  @brief Replace or set a content of the view.
@@ -181,21 +181,21 @@ public:
         *
         *  @see UiViewState
         */
-       UiViewState getState();
+       UiViewState getState() const;
 
        /**
         *  @brief Returns a state of removable content.
         *
         *  @return @c true if the view's content is removable, otherwise @c false
         */
-       bool getRemovableContent();
+       bool getRemovableContent() const;
 
        /**
         *  @brief Returns the indicator mode of this view.
         *
         *  @return indicator state of this view
         */
-       UiViewIndicator getIndicator();
+       UiViewIndicator getIndicator() const;
 
        /**
         *  @brief The H/W back key event occurs on view.
@@ -229,7 +229,7 @@ protected:
         *
         *  @see setEventBlock()
         */
-       bool getEventBlock();
+       bool getEventBlock() const;
 
        /**
         *  @brief View load state.
@@ -346,7 +346,7 @@ private:
         *
         *  @see _setViewmgr()
         */
-       UiIfaceViewmgr *_getViewmgr();
+       UiIfaceViewmgr *_getViewmgr() const;
 
 public:
        _UI_DISABLE_COPY_AND_ASSIGN(UiIfaceView);
index 2bdbcab57fd509c3ae965bcbb1292c11b67a9085..2145f813c84eceae8e29ee5f6f51eb4d22ba478f 100644 (file)
@@ -74,7 +74,7 @@ Eo *UiBaseView::unsetContent()
        return obj;
 }
 
-Eo *UiBaseView::getBase()
+Eo *UiBaseView::getBase() const
 {
        auto viewmgr = UI_BASE_VIEWMGR;
 
@@ -85,7 +85,7 @@ Eo *UiBaseView::getBase()
        return viewmgr->getBase();
 }
 
-Eo *UiBaseView ::getParent()
+Eo *UiBaseView ::getParent() const
 {
        auto viewmgr = UI_BASE_VIEWMGR;
 
@@ -162,7 +162,7 @@ int UiBaseView::setEventBlock(bool block)
        return UI_VIEWMGR_ERROR_NONE;
 }
 
-int UiBaseView::getDegree()
+int UiBaseView::getDegree() const
 {
        auto viewmgr = UI_BASE_VIEWMGR;
 
index 813d0c024f3d77bc51068bd8dcc7d160be402790..b4d76f0aef8af5d199a66f47281efd2f78528b1f 100644 (file)
@@ -63,7 +63,7 @@ public:
        void pushView(UiBaseView *view);
        void popView();
 
-       Eo *getBase() {
+       Eo *getBase() const {
                return this->_layout;
        }
 
@@ -525,7 +525,7 @@ UiBaseView *UiBaseViewmgr::getLastView()
        return dynamic_cast<UiBaseView *>(UiIfaceViewmgr::getLastView());
 }
 
-Eo *UiBaseViewmgr::getBase()
+Eo *UiBaseViewmgr::getBase() const
 {
        return this->_impl->getBase();
 }
index 09a02c226a8b73f7c17882c7c1ddc9f78372ea7d..c3f5595209e01d82ebb24375745b6c43056275bf 100644 (file)
@@ -83,7 +83,7 @@ UiMenu::~UiMenu()
        evas_object_del(ctxpopup);
 }
 
-Elm_Win *UiMenu::getWindow()
+Elm_Win *UiMenu::getWindow() const
 {
        UiViewmgr *viewmgr = UI_VIEWMGR;
        if (!viewmgr) {
@@ -137,7 +137,7 @@ int UiMenu::setContent(Elm_Ctxpopup *ctxpopup)
        return UiBaseOverlay::setContent(ctxpopup);
 }
 
-bool UiMenu::isActivated()
+bool UiMenu::isActivated() const
 {
        Elm_Ctxpopup *ctxpopup = this->getContent();
        if (!ctxpopup) return false;
@@ -156,12 +156,12 @@ Elm_Ctxpopup *UiMenu::unsetContent()
        return ctxpopup;
 }
 
-Eo *UiMenu::getBase()
+Eo *UiMenu::getBase() const
 {
        return this->getWindow();
 }
 
-int UiMenu::getDegree()
+int UiMenu::getDegree() const
 {
        return this->getView()->getDegree();
 }
index 6e4a7813a21b3c074f529c859d9f5f202822a266..aa00d4e1befffc39fec0183af75947d36ea1ea44 100644 (file)
@@ -59,7 +59,7 @@ UiPopup::~UiPopup()
        evas_object_del(popup);
 }
 
-Elm_Win *UiPopup::getWindow()
+Elm_Win *UiPopup::getWindow() const
 {
        UiViewmgr *viewmgr = UI_VIEWMGR;
        if (!viewmgr) {
@@ -113,7 +113,7 @@ int UiPopup::setContent(Elm_Popup *popup)
        return UiBaseOverlay::setContent(popup);
 }
 
-bool UiPopup::isActivated()
+bool UiPopup::isActivated() const
 {
        Elm_Popup *popup = this->getContent();
        if (!popup) return false;
@@ -131,12 +131,12 @@ Elm_Popup *UiPopup::unsetContent()
        return popup;
 }
 
-Eo *UiPopup::getBase()
+Eo *UiPopup::getBase() const
 {
        return this->getWindow();
 }
 
-int UiPopup::getDegree()
+int UiPopup::getDegree() const
 {
        return this->getView()->getDegree();
 }
index fe0b1aebec2897b1f076f15f3e746f637a5c8d88..59a9d63029223422569f221c724802614ab6aa7a 100644 (file)
@@ -57,17 +57,17 @@ public:
        Elm_Button *unsetTitleLeftBtn();
        Elm_Button *unsetTitleRightBtn();
        Elm_Toolbar *unsetToolbar();
-       Eo *getBase();
+       Eo *getBase() const;
 
-       Elm_Button *getTitleLeftBtn() {
+       Elm_Button *getTitleLeftBtn() const {
                return this->_titleLeftBtn;
        }
 
-       Elm_Button *getTitleRightBtn() {
+       Elm_Button *getTitleRightBtn()const {
                return this->_titleRightBtn;
        }
 
-       Elm_Toolbar *getToolbar() {
+       Elm_Toolbar *getToolbar() const {
                return this->_toolbar;
        }
 };
@@ -407,10 +407,10 @@ Elm_Toolbar *UiStandardViewImpl::unsetToolbar()
        return toolbar;
 }
 
-Eo *UiStandardViewImpl::getBase()
+Eo *UiStandardViewImpl::getBase() const
 {
        if (!this->_layout) {
-               this->_createLayout();
+               const_cast<UiStandardViewImpl*>(this)->_createLayout();
        }
 
        return this->_layout;
@@ -538,7 +538,7 @@ Elm_Toolbar *UiStandardView::unsetToolbar()
        return this->_impl->unsetToolbar();
 }
 
-Eo *UiStandardView::getBase()
+Eo *UiStandardView::getBase() const
 {
        return this->_impl->getBase();
 }
@@ -548,17 +548,17 @@ int UiStandardView::setTitleVisible(bool visible, bool anim)
        return this->_impl->setTitleVisible(visible, anim);
 }
 
-Elm_Button *UiStandardView::getTitleLeftBtn()
+Elm_Button *UiStandardView::getTitleLeftBtn() const
 {
        return this->_impl->getTitleLeftBtn();
 }
 
-Elm_Button *UiStandardView::getTitleRightBtn()
+Elm_Button *UiStandardView::getTitleRightBtn() const
 {
        return this->_impl->getTitleRightBtn();
 }
 
-Elm_Toolbar *UiStandardView::getToolbar()
+Elm_Toolbar *UiStandardView::getToolbar() const
 {
        return this->_impl->getToolbar();
 }
index fd3cd393c0810b0c48d7d22a69edbc47af094da2..54486ac30fe72ca03f07f3de7cbfbcc67116c0a9 100644 (file)
@@ -54,12 +54,12 @@ public:
        explicit UiViewImpl(UiView *view);
        ~UiViewImpl();
 
-       const UiMenu *getMenu()
+       const UiMenu *getMenu() const
        {
                return this->_menu;
        }
 
-       UiViewOrientationMode getOrientationMode();
+       UiViewOrientationMode getOrientationMode() const;
 };
 
 }
@@ -160,7 +160,7 @@ void UiViewImpl::onLandscape()
        this->_menu->onLandscape();
 }
 
-UiViewOrientationMode UiViewImpl::getOrientationMode()
+UiViewOrientationMode UiViewImpl::getOrientationMode() const
 {
        switch (this->_view->getDegree()) {
                case 0:
@@ -254,12 +254,12 @@ void UiView::onLandscape()
        this->_impl->onLandscape();
 }
 
-UiViewOrientationMode UiView::getOrientationMode()
+UiViewOrientationMode UiView::getOrientationMode() const
 {
        return this->_impl->getOrientationMode();
 }
 
-const UiMenu *UiView::getMenu()
+const UiMenu *UiView::getMenu() const
 {
        return this->_impl->getMenu();
 }
index c8646c41b3fbf3fd67589bbdc68060c7419097f8..df5281fede2976ef70bbc0665f99dd1a061b7474 100644 (file)
@@ -6,7 +6,7 @@ struct ui_menu_s
        ui_menu *p;
 };
 
-static int validate_menu(ui_menu *menu)
+static int validate_menu(const ui_menu *menu)
 {
        if (!menu)
        {
@@ -25,7 +25,7 @@ EAPI int ui_menu_set_content(ui_menu *menu, Elm_Ctxpopup *ctxpopup)
        return menu->setContent(ctxpopup);
 }
 
-EAPI Elm_Ctxpopup *ui_menu_get_content(ui_menu *menu)
+EAPI Elm_Ctxpopup *ui_menu_get_content(const ui_menu *menu)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_menu(menu)) return nullptr;
 
@@ -57,7 +57,7 @@ EAPI int ui_menu_deactivate(ui_menu *menu)
        return menu->deactivate();
 }
 
-EAPI bool ui_menu_get_activated(ui_menu *menu)
+EAPI bool ui_menu_get_activated(const ui_menu *menu)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_menu(menu)) return nullptr;
 
@@ -65,7 +65,7 @@ EAPI bool ui_menu_get_activated(ui_menu *menu)
        return menu->isActivated();
 }
 
-EAPI Eo *ui_menu_get_base(ui_menu *menu)
+EAPI Eo *ui_menu_get_base(const ui_menu *menu)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_menu(menu)) return nullptr;
 
@@ -73,7 +73,7 @@ EAPI Eo *ui_menu_get_base(ui_menu *menu)
        return menu->getBase();
 }
 
-EAPI int ui_menu_get_degree(ui_menu *menu)
+EAPI int ui_menu_get_degree(const ui_menu *menu)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_menu(menu)) return -1;
 
@@ -81,7 +81,7 @@ EAPI int ui_menu_get_degree(ui_menu *menu)
        return menu->getDegree();
 }
 
-EAPI ui_view *ui_menu_get_view(ui_menu *menu)
+EAPI ui_view *ui_menu_get_view(const ui_menu *menu)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_menu(menu)) return nullptr;
 
index 60e562c36f82dcf4f210de13a83a82916f2fdd8a..999529641d8a8dd7fd1001ae18fa82c4f73fbfe6 100644 (file)
@@ -6,7 +6,7 @@ struct ui_popup_s
        ui_popup *p;
 };
 
-static int validate_popup(ui_popup *popup)
+static int validate_popup(const ui_popup *popup)
 {
        if (!popup)
        {
@@ -55,7 +55,7 @@ EAPI int ui_popup_set_content(ui_popup *popup, Elm_Popup *content)
        return popup->setContent(content);
 }
 
-EAPI Elm_Popup *ui_popup_get_content(ui_popup *popup)
+EAPI Elm_Popup *ui_popup_get_content(const ui_popup *popup)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_popup(popup)) return nullptr;
 
@@ -87,7 +87,7 @@ EAPI int ui_popup_deactivate(ui_popup *popup)
        return popup->deactivate();
 }
 
-EAPI bool ui_popup_get_activated(ui_popup *popup)
+EAPI bool ui_popup_get_activated(const ui_popup *popup)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_popup(popup)) return false;
 
@@ -95,7 +95,7 @@ EAPI bool ui_popup_get_activated(ui_popup *popup)
        return popup->isActivated();
 }
 
-EAPI Eo *ui_popup_get_base(ui_popup *popup)
+EAPI Eo *ui_popup_get_base(const ui_popup *popup)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_popup(popup)) return nullptr;
 
@@ -103,7 +103,7 @@ EAPI Eo *ui_popup_get_base(ui_popup *popup)
        return popup->getBase();
 }
 
-EAPI int ui_popup_get_degree(ui_popup *popup)
+EAPI int ui_popup_get_degree(const ui_popup *popup)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_popup(popup)) return -1;
 
@@ -111,7 +111,7 @@ EAPI int ui_popup_get_degree(ui_popup *popup)
        return popup->getDegree();
 }
 
-EAPI ui_view *ui_popup_get_view(ui_popup *popup)
+EAPI ui_view *ui_popup_get_view(const ui_popup *popup)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_popup(popup)) return nullptr;
 
index 1fb815f674e4d33a4fcb8fdbb675e26d312f94eb..cd171af2becba7b07cd6c0a71b8084423a7c8895 100644 (file)
@@ -203,7 +203,7 @@ struct ui_standard_view_s
        ui_standard_view_capi *p;
 };
 
-static ui_standard_view_capi *validate_view(ui_standard_view *view)
+static ui_standard_view_capi *validate_view(const ui_standard_view *view)
 {
        if (!view)
        {
@@ -212,7 +212,7 @@ static ui_standard_view_capi *validate_view(ui_standard_view *view)
                return nullptr;
        }
 
-       auto capi_view = dynamic_cast<ui_standard_view_capi *>(view);
+       auto capi_view = dynamic_cast<ui_standard_view_capi *>(const_cast<ui_standard_view*>(view));
        if (!capi_view)
        {
                LOGE("Invalid ui_standard_view = %p. Probably, you passed ui_view, not ui_standard_view.", view);
@@ -269,7 +269,7 @@ EAPI int ui_standard_view_set_title_right_btn(ui_standard_view *view, Eo *title_
        return capi_view->setTitleRightBtn(title_right_btn);
 }
 
-EAPI Elm_Button *ui_standard_view_get_title_right_btn(ui_standard_view *view)
+EAPI Elm_Button *ui_standard_view_get_title_right_btn(const ui_standard_view *view)
 {
        ui_standard_view_capi *capi_view = validate_view(view);
        if (!capi_view)
@@ -298,7 +298,7 @@ EAPI int ui_standard_view_set_title_left_btn(ui_standard_view *view, Eo *title_l
        return capi_view->setTitleLeftBtn(title_left_btn);
 }
 
-EAPI Elm_Button *ui_standard_view_get_title_left_btn(ui_standard_view *view)
+EAPI Elm_Button *ui_standard_view_get_title_left_btn(const ui_standard_view *view)
 {
        ui_standard_view_capi *capi_view = validate_view(view);
        if (!capi_view) return nullptr;
@@ -323,7 +323,7 @@ EAPI int ui_standard_view_set_toolbar(ui_standard_view *view, Elm_Toolbar *toolb
        return capi_view->setToolbar(toolbar);
 }
 
-EAPI Elm_Toolbar *ui_standard_view_get_toolbar(ui_standard_view *view)
+EAPI Elm_Toolbar *ui_standard_view_get_toolbar(const ui_standard_view *view)
 {
        ui_standard_view_capi *capi_view = validate_view(view);
        if (!capi_view) return nullptr;
index 81097f09d5dc018cdfa0220e574e281649783c90..b9c420995edafadde5005680cd8958bdec9d4780 100644 (file)
@@ -202,7 +202,7 @@ struct ui_view_s
        ui_view_capi *p;
 };
 
-static int validate_view(ui_view *view)
+static int validate_view(const ui_view *view)
 {
        if (!view)
        {
@@ -252,7 +252,7 @@ EAPI int ui_view_set_event_cb(ui_view *view, ui_view_event_type_e event_type, ui
        return UI_VIEWMGR_ERROR_NONE;
 }
 
-EAPI Eo* ui_view_get_base(ui_view *view)
+EAPI Eo* ui_view_get_base(const ui_view *view)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return nullptr;
        return view->getBase();
@@ -274,7 +274,7 @@ EAPI int ui_view_set_indicator(ui_view *view, ui_view_indicator indicator)
        return view->setIndicator(indicator);
 }
 
-EAPI ui_view_indicator ui_view_get_indicator(ui_view *view)
+EAPI ui_view_indicator ui_view_get_indicator(const ui_view *view)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return UI_VIEW_INDICATOR_UNKNOWN;
 
@@ -292,7 +292,7 @@ EAPI int ui_view_set_removable_content(ui_view *view, bool remove)
        return UI_VIEWMGR_ERROR_NONE;
 }
 
-EAPI bool ui_view_get_removable_content(ui_view *view)
+EAPI bool ui_view_get_removable_content(const ui_view *view)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return false;
 
@@ -300,7 +300,7 @@ EAPI bool ui_view_get_removable_content(ui_view *view)
        return view->getRemovableContent();
 }
 
-EAPI int ui_view_get_degree(ui_view *view)
+EAPI int ui_view_get_degree(const ui_view *view)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return -1;
 
@@ -308,7 +308,7 @@ EAPI int ui_view_get_degree(ui_view *view)
        return view->getDegree();
 }
 
-EAPI ui_view_orientation_mode ui_view_get_orientation_mode(ui_view *view)
+EAPI ui_view_orientation_mode ui_view_get_orientation_mode(const ui_view *view)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return UI_VIEW_ORIENTATION_MODE_UNKNOWN;
 
@@ -325,7 +325,7 @@ EAPI int ui_view_set_available_rotations(ui_view *view, const int *rotations, un
        return view->setAvailableRotations(rotations, count);
 }
 
-EAPI const int *ui_view_get_available_rotations(ui_view *view, unsigned int *count)
+EAPI const int *ui_view_get_available_rotations(const ui_view *view, unsigned int *count)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return false;
 
@@ -341,7 +341,7 @@ EAPI int ui_view_set_transition_style(ui_view *view, const char *style)
        return view->setTransitionStyle(style);
 }
 
-EAPI const char *ui_view_get_transition_style(ui_view *view)
+EAPI const char *ui_view_get_transition_style(const ui_view *view)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return nullptr;
 
@@ -349,7 +349,7 @@ EAPI const char *ui_view_get_transition_style(ui_view *view)
        return view->getTransitionStyle();
 }
 
-EAPI ui_menu *ui_view_get_menu(ui_view *view)
+EAPI ui_menu *ui_view_get_menu(const ui_view *view)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return nullptr;
 
@@ -357,7 +357,7 @@ EAPI ui_menu *ui_view_get_menu(ui_view *view)
        return const_cast<ui_menu*>(view->getMenu());
 }
 
-EAPI const char *ui_view_get_name(ui_view *view)
+EAPI const char *ui_view_get_name(const ui_view *view)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return nullptr;
 
@@ -365,7 +365,7 @@ EAPI const char *ui_view_get_name(ui_view *view)
        return view->getName();
 }
 
-EAPI ui_view_state ui_view_get_state(ui_view *view)
+EAPI ui_view_state ui_view_get_state(const ui_view *view)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return UI_VIEW_STATE_UNKNOWN;
 
@@ -373,7 +373,7 @@ EAPI ui_view_state ui_view_get_state(ui_view *view)
        return view->getState();
 }
 
-EAPI Eo *ui_view_get_content(ui_view *view)
+EAPI Eo *ui_view_get_content(const ui_view *view)
 {
        if (UI_VIEWMGR_ERROR_NONE != validate_view(view)) return nullptr;
 
index b6b88dd56ebf4a8a37982a2a9ac2a6f2979aadb5..20289da835546adc1551d482e4a0ad31ea64e7cf 100644 (file)
@@ -37,8 +37,8 @@ private:
 public:
        int setContent(T content);
        T unsetContent();
-       UiIfaceView *getView();
-       T getContent();
+       UiIfaceView *getView() const;
+       T getContent() const;
 
        UiIfaceOverlayImpl(UiIfaceOverlay *overlay, UiIfaceView *view);
        ~UiIfaceOverlayImpl();
@@ -68,12 +68,12 @@ T UiIfaceOverlayImpl::unsetContent()
        return prev;
 }
 
-T UiIfaceOverlayImpl::getContent()
+T UiIfaceOverlayImpl::getContent() const
 {
        return this->_content;
 }
 
-UiIfaceView *UiIfaceOverlayImpl::getView()
+UiIfaceView *UiIfaceOverlayImpl::getView() const
 {
        return this->_view;
 }
@@ -102,12 +102,12 @@ T UiIfaceOverlay::unsetContent()
        return this->_impl->unsetContent();
 }
 
-T UiIfaceOverlay::getContent()
+T UiIfaceOverlay::getContent() const
 {
        return this->_impl->getContent();
 }
 
-UiIfaceView *UiIfaceOverlay::getView()
+UiIfaceView *UiIfaceOverlay::getView() const
 {
        return this->_impl->getView();
 }
index e11b89e5f149ce96b0d1de52143491f51744466a..8817dcf5c7d5497bd050a2d2784af7feedcf34ab 100644 (file)
@@ -57,7 +57,7 @@ public:
        void onPause();
        void onResume();
        void onDestroy();
-       bool getEventBlock();
+       bool getEventBlock() const;
        int setContent(T content);
        T unsetContent();
 
@@ -68,13 +68,13 @@ public:
        void setRemovableContent(bool removable);
        int setIndicator(UiViewIndicator indicator);
        int setAvailableRotations(const int *rotations, unsigned int count);
-       const int *getAvailableRotations(unsigned int *count);
-       const char *getTransitionStyle();
-       const char *getName();
-       T getContent();
-       UiViewState getState();
-       bool getRemovableContent();
-       UiViewIndicator getIndicator();
+       const int *getAvailableRotations(unsigned int *count) const;
+       const char *getTransitionStyle() const;
+       const char *getName() const;
+       T getContent() const;
+       UiViewState getState() const;
+       bool getRemovableContent() const;
+       UiViewIndicator getIndicator() const;
        void onBack();
 };
 
@@ -82,7 +82,7 @@ public:
 
 #define MAX_NUM_OF_AVAILABLE_ROTATIONS 4
 
-bool UiIfaceViewImpl::getEventBlock()
+bool UiIfaceViewImpl::getEventBlock() const
 {
        return this->_eventBlock;
 }
@@ -226,7 +226,7 @@ int UiIfaceViewImpl::setAvailableRotations(const int *rotations, unsigned int co
        return UI_VIEWMGR_ERROR_NONE;
 }
 
-const int *UiIfaceViewImpl::getAvailableRotations(unsigned int *count)
+const int *UiIfaceViewImpl::getAvailableRotations(unsigned int *count) const
 {
        if (!count) {
                set_last_result(UI_VIEWMGR_ERROR_INVALID_PARAMETER);
@@ -246,32 +246,32 @@ const int *UiIfaceViewImpl::getAvailableRotations(unsigned int *count)
        }
 }
 
-const char *UiIfaceViewImpl::getTransitionStyle()
+const char *UiIfaceViewImpl::getTransitionStyle() const
 {
        return this->_transitionStyle.c_str();
 }
 
-const char *UiIfaceViewImpl::getName()
+const char *UiIfaceViewImpl::getName() const
 {
        return this->_name.c_str();
 }
 
-T UiIfaceViewImpl::getContent()
+T UiIfaceViewImpl::getContent() const
 {
        return this->_content;
 }
 
-UiViewState UiIfaceViewImpl::getState()
+UiViewState UiIfaceViewImpl::getState() const
 {
        return this->_state;
 }
 
-bool UiIfaceViewImpl::getRemovableContent()
+bool UiIfaceViewImpl::getRemovableContent() const
 {
        return this->_removableContent;
 }
 
-UiViewIndicator UiIfaceViewImpl::getIndicator()
+UiViewIndicator UiIfaceViewImpl::getIndicator() const
 {
        return this->_indicator;
 }
@@ -290,7 +290,7 @@ void UiIfaceViewImpl::onBack()
 /* External class Implementation                                                               */
 /***********************************************************************************************/
 
-bool UiIfaceView::getEventBlock()
+bool UiIfaceView::getEventBlock() const
 {
        return this->_impl->getEventBlock();
 }
@@ -375,37 +375,37 @@ int UiIfaceView::setAvailableRotations(const int *rotations, unsigned int count)
        return this->_impl->setAvailableRotations(rotations, count);
 }
 
-const int *UiIfaceView::getAvailableRotations(unsigned int *count)
+const int *UiIfaceView::getAvailableRotations(unsigned int *count) const
 {
        return this->_impl->getAvailableRotations(count);
 }
 
-const char *UiIfaceView::getTransitionStyle()
+const char *UiIfaceView::getTransitionStyle() const
 {
        return this->_impl->getTransitionStyle();
 }
 
-const char *UiIfaceView::getName()
+const char *UiIfaceView::getName() const
 {
        return this->_impl->getName();
 }
 
-T UiIfaceView::getContent()
+T UiIfaceView::getContent() const
 {
        return this->_impl->getContent();
 }
 
-UiViewState UiIfaceView::getState()
+UiViewState UiIfaceView::getState() const
 {
        return this->_impl->getState();
 }
 
-bool UiIfaceView::getRemovableContent()
+bool UiIfaceView::getRemovableContent() const
 {
        return this->_impl->getRemovableContent();
 }
 
-UiViewIndicator UiIfaceView::getIndicator()
+UiViewIndicator UiIfaceView::getIndicator() const
 {
        return this->_impl->getIndicator();
 }
@@ -420,7 +420,7 @@ void UiIfaceView::_setViewmgr(UiIfaceViewmgr *viewmgr)
        this->_impl->_viewmgr = viewmgr;
 }
 
-UiIfaceViewmgr *UiIfaceView::_getViewmgr()
+UiIfaceViewmgr *UiIfaceView::_getViewmgr() const
 {
        return this->_impl->_viewmgr;
 }