Remove MULTI_WINDOW define
authorChoi Munseok <ms47.choi@samsung.com>
Mon, 4 Mar 2013 11:17:29 +0000 (20:17 +0900)
committerChoi Munseok <ms47.choi@samsung.com>
Mon, 4 Mar 2013 11:17:29 +0000 (20:17 +0900)
Change-Id: I46c9deae369396df35191c3a55634ab05ad07660
Signed-off-by: Choi Munseok <ms47.choi@samsung.com>
src/FShell_LiveboxFrame.cpp
src/FShell_LiveboxFrame.h
src/FShell_LiveboxPopup.cpp
src/FShell_LiveboxPopup.h
src/FShell_LiveboxPopupView.cpp
src/FShell_QuickPanelFrame.cpp
src/FShell_QuickPanelFrameImpl.cpp
src/inc/FShell_QuickPanelFrame.h
src/inc/FShell_QuickPanelFrameImpl.h

index 7444e1c..c36507f 100644 (file)
@@ -42,9 +42,7 @@ namespace Tizen { namespace Shell
 
 _LiveboxFrame::_LiveboxFrame(void)
        : __pLiveboxFramePresenter(new (std::nothrow) _LiveboxFramePresenter(*this))
-#if defined(MULTI_WINDOW)
        , __pLiveboxLayer(null)
-#endif // MULTI_WINDOW
        , __pLiveboxFrameRootVisualElement(null)
        , __pEventManager(null)
 {
@@ -64,19 +62,8 @@ _LiveboxFrame::~_LiveboxFrame(void)
                __pEventManager->UnregisterTouchEventHandler(*this);
        }
 
-#if defined(MULTI_WINDOW)
        __pLiveboxLayer = null;
        __pLiveboxFrameRootVisualElement = null;
-#else // MULTI_WINDOW
-       if (__pLiveboxFrameRootVisualElement)
-       {
-               _VisualElement* pVisualElement = GetVisualElement();
-               if (pVisualElement)
-               {
-                       __pLiveboxFrameRootVisualElement->DetachChild(*pVisualElement);
-               }
-       }
-#endif // !MULTI_WINDOW
 }
 
 _LiveboxFrame*
@@ -118,28 +105,8 @@ _LiveboxFrame::Initialize(const FloatDimension& size)
 
        __liveboxSize = size;
 
-#if defined(MULTI_WINDOW)
        r = CreateRootVisualElement();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-#else // MULTI_WINDOW
-       unique_ptr<_LiveboxLayer> pLayer(new (std::nothrow) _LiveboxLayer(__liveboxSize));
-       SysTryReturn(NID_UI_CTRL, pLayer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
-
-       pLayer->Construct();
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
-       __pLiveboxLayer = move(pLayer);
-       __pLiveboxFrameRootVisualElement = __pLiveboxLayer->GetRootVisualElement();
-
-       _VisualElement* pVisualElement = GetVisualElement();
-       r = GetLastResult();
-       SysTryReturn(NID_UI_CTRL, pVisualElement, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
-       pVisualElement->SetClipChildrenEnabled(false);
-       pVisualElement->SetShowState(true);
-
-       __pLiveboxFrameRootVisualElement->AttachChild(*pVisualElement);
-#endif // MULTI_WINDOW
 
        FloatRectangle bounds(0.0f, 0.0f, liveboxSize.width, liveboxSize.height);
        r = SetBoundsF(bounds);
@@ -218,7 +185,6 @@ _LiveboxFrame::SetLayerBounds(const FloatRectangle& bounds)
        return r;
 }
 
-#if defined(MULTI_WINDOW)
 result
 _LiveboxFrame::CreateLayer(void)
 {
@@ -236,7 +202,6 @@ _LiveboxFrame::CreateLayer(void)
 
        return r;
 }
-#endif // MULTI_WINDOW
 
 void
 _LiveboxFrame::OnActivated(void)
index aab548e..b32a112 100644 (file)
@@ -69,9 +69,8 @@ private:
        result SetLayerShowState(bool showState);
        result SetLayerBounds(const Tizen::Graphics::FloatRectangle& bounds);
 
-#if defined(MULTI_WINDOW)
        virtual result CreateLayer(void);
-#endif // MULTI_WINDOW
+
        virtual void OnActivated(void);
        virtual void OnDeactivated(void);
        virtual void OnBoundsChanged(void);
@@ -79,11 +78,7 @@ private:
 
 private:
        std::unique_ptr<_LiveboxFramePresenter> __pLiveboxFramePresenter;
-#if defined(MULTI_WINDOW)
        _LiveboxLayer* __pLiveboxLayer;
-#else // MULTI_WINDOW
-       std::unique_ptr<_LiveboxLayer> __pLiveboxLayer;
-#endif // !MULTI_WINDOW
        Tizen::Ui::Animations::_RootVisualElement* __pLiveboxFrameRootVisualElement;
        Tizen::Ui::_IUiEventManager* __pEventManager;
        Tizen::Graphics::FloatDimension __liveboxSize;
index 52b5ade..00b0085 100644 (file)
@@ -126,9 +126,7 @@ _LiveboxPopupLayer::ReleasePixmap(void)
 
 _LiveboxPopup::_LiveboxPopup(void)
        : __pLiveboxPopupPresenter(new (std::nothrow) _LiveboxPopupPresenter(*this))
-#if defined(MULTI_WINDOW)
        , __pLiveboxPopupLayer(null)
-#endif // MULTI_WINDOW
        , __pLiveboxPopupRootVisualElement(null)
        , __pEventManager(null)
 {
@@ -148,19 +146,8 @@ _LiveboxPopup::~_LiveboxPopup(void)
                __pEventManager->UnregisterTouchEventHandler(*this);
        }
 
-#if defined(MULTI_WINDOW)
        __pLiveboxPopupLayer = null;
        __pLiveboxPopupRootVisualElement = null;
-#else // MULTI_WINDOW
-       if (__pLiveboxPopupRootVisualElement)
-       {
-               _VisualElement* pVisualElement = GetVisualElement();
-               if (pVisualElement)
-               {
-                       __pLiveboxPopupRootVisualElement->DetachChild(*pVisualElement);
-               }
-       }
-#endif // !MULTI_WINDOW
 }
 
 _LiveboxPopup*
@@ -193,29 +180,8 @@ _LiveboxPopup::Initialize(const FloatDimension& size)
 
        SetSystemWindow(true);
 
-#if defined(MULTI_WINDOW)
        r = CreateRootVisualElement();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-#else // MULTI_WINDOW
-       unique_ptr<_LiveboxPopupLayer> pLayer(new (std::nothrow) _LiveboxPopupLayer(__liveboxSize));
-       SysTryReturn(NID_UI_CTRL, pLayer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
-
-       r = pLayer->Construct();
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
-       __pLiveboxPopupLayer = move(pLayer);
-       __pLiveboxPopupRootVisualElement = __pLiveboxPopupLayer->GetRootVisualElement();
-
-       _VisualElement* pVisualElement = GetVisualElement();
-       r = GetLastResult();
-       SysTryReturn(NID_UI_CTRL, pVisualElement, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
-       pVisualElement->SetClipChildrenEnabled(false);
-       pVisualElement->SetShowState(true);
-       pVisualElement->SetRenderOperation(_VisualElement::RENDER_OPERATION_COPY);
-
-       __pLiveboxPopupRootVisualElement->AttachChild(*pVisualElement);
-#endif // MULTI_WINDOW
 
        FloatRectangle bounds(0.0f, 0.0f, size.width, size.height);
        r = SetBoundsF(bounds);
@@ -356,7 +322,6 @@ _LiveboxPopup::GetLiveboxPopupClientBounds(void) const
        return clientBounds;
 }
 
-#if defined(MULTI_WINDOW)
 result
 _LiveboxPopup::CreateLayer(void)
 {
@@ -374,7 +339,6 @@ _LiveboxPopup::CreateLayer(void)
 
        return r;
 }
-#endif // MULTI_WINDOW
 
 void
 _LiveboxPopup::OnActivated(void)
index d2a2a5b..ab34911 100644 (file)
@@ -82,20 +82,15 @@ private:
        result SetLayerBounds(const Tizen::Graphics::FloatRectangle& bounds);
        Tizen::Graphics::FloatRectangle GetLiveboxPopupClientBounds(void) const;
 
-#if defined(MULTI_WINDOW)
        virtual result CreateLayer(void);
-#endif // MULTI_WINDOW
+
        virtual void OnActivated(void);
        virtual void OnBoundsChanged(void);
        virtual void OnDraw(void);
 
 private:
        std::unique_ptr<_LiveboxPopupPresenter> __pLiveboxPopupPresenter;
-#if defined(MULTI_WINDOW)
        _LiveboxPopupLayer* __pLiveboxPopupLayer;
-#else // MULTI_WINDOW
-       std::unique_ptr<_LiveboxPopupLayer> __pLiveboxPopupLayer;
-#endif // !MULTI_WINDOW
        Tizen::Ui::Animations::_RootVisualElement* __pLiveboxPopupRootVisualElement;
        Tizen::Ui::_IUiEventManager* __pEventManager;
        Tizen::Graphics::FloatDimension __liveboxSize;
index 7664183..fc9ee5a 100644 (file)
@@ -92,10 +92,8 @@ _LiveboxPopupView::CreateLiveboxPopupN(_LiveboxView& liveBoxView)
        result r = GetLastResult();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
 
-#if defined(MULTI_WINDOW)
        r = pLiveboxPopup->CreateRootVisualElement();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
-#endif // MULTI_WINDOW
 
        pLiveboxPopup->AcquireHandle();
 
index 9c3aa7e..6e8f625 100644 (file)
@@ -111,10 +111,6 @@ private:
 
 _QuickPanelFrame::_QuickPanelFrame(void)
        : __pQuickPanelFramePresenter(null)
-#if !defined(MULTI_WINDOW)
-       , __pQuickPanelFrameLayer(null)
-       , __pQuickPanelFrameRootVisualElement(null)
-#endif
        , __pEventManager(null)
 {
        _UiEventManager* pEventManager = null;
@@ -124,15 +120,6 @@ _QuickPanelFrame::_QuickPanelFrame(void)
 
        result r = E_SUCCESS;
 
-#if !defined(MULTI_WINDOW)
-       __pQuickPanelFrameLayer = new (std::nothrow) _QuickPanelFrameLayer;
-       r = __pQuickPanelFrameLayer->Construct();
-       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
-
-       __pQuickPanelFrameRootVisualElement = __pQuickPanelFrameLayer->GetRootVisualElement();
-#endif
-
        pEventManager = _UiEventManager::GetInstance();
        SysTryCatch(NID_UI_CTRL, pEventManager, , r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -151,14 +138,6 @@ CATCH:
                delete __pQuickPanelFramePresenter;
                __pQuickPanelFramePresenter = null;
        }
-
-#if !defined(MULTI_WINDOW)
-       if( __pQuickPanelFrameLayer )
-       {
-               delete __pQuickPanelFrameLayer;
-       }
-       __pQuickPanelFrameRootVisualElement = NULL;
-#endif
 }
 
 _QuickPanelFrame::~_QuickPanelFrame(void)
@@ -173,25 +152,6 @@ _QuickPanelFrame::~_QuickPanelFrame(void)
                delete __pQuickPanelFramePresenter;
                __pQuickPanelFramePresenter = null;
        }
-
-#if !defined(MULTI_WINDOW)
-       if (__pQuickPanelFrameRootVisualElement)
-       {
-               _VisualElement* pVisualElement = GetVisualElement();
-               if (pVisualElement)
-               {
-                       __pQuickPanelFrameRootVisualElement->DetachChild(*pVisualElement);
-               }
-
-       }
-
-       if( __pQuickPanelFrameLayer )
-       {
-               delete __pQuickPanelFrameLayer;
-               __pQuickPanelFrameLayer = NULL;
-       }
-       __pQuickPanelFrameRootVisualElement = NULL;
-#endif
 }
 
 _QuickPanelFrame*
@@ -203,12 +163,9 @@ _QuickPanelFrame::CreateQuickPanelFrameN(void)
        result r = GetLastResult();
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
-#if defined(MULTI_WINDOW)
        r = pQuickPanelFrame->CreateRootVisualElement();
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
-#endif
-
        pQuickPanelFrame->AcquireHandle();
 
        SetLastResult(E_SUCCESS);
@@ -235,14 +192,10 @@ _QuickPanelFrame::Initialize(float height)
 
        FloatDimension sizeF(static_cast<float>(size.width), height);
 
-#if !defined(MULTI_WINDOW)
-       __pLayer = dynamic_cast<_QuickPanelFrameLayer*>(__pQuickPanelFrameRootVisualElement->GetNativeLayer());
-#else
        _RootVisualElement* pRootVE = GetRootVisualElement();
        SysAssert(pRootVE);
 
        __pLayer = dynamic_cast<_QuickPanelFrameLayer*>(pRootVE->GetNativeLayer());
-#endif
        r = GetLastResult();
        SysTryReturn(NID_UI_CTRL, __pLayer, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -254,26 +207,14 @@ _QuickPanelFrame::Initialize(float height)
 
        FloatRectangle fBounds(0.0f, 0.0f, sizeF.width, sizeF.height);
 
-#if !defined(MULTI_WINDOW)
-       __pQuickPanelFrameRootVisualElement->SetImplicitAnimationEnabled(false);
-       __pQuickPanelFrameRootVisualElement->SetBounds(fBounds);
-       __pQuickPanelFrameRootVisualElement->SetShowState(true);
-
-#else
        pRootVE->SetImplicitAnimationEnabled(false);
        pRootVE->SetBounds(fBounds);
        pRootVE->SetShowState(true);
-#endif
 
        _VisualElement* pVisualElement = GetVisualElement();
        r = GetLastResult();
        SysTryReturn(NID_UI_CTRL, pVisualElement, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
-#if !defined(MULTI_WINDOW)
-       __pQuickPanelFrameRootVisualElement->AttachChild(*pVisualElement);
-       pVisualElement->SetClipChildrenEnabled(false);
-
-#endif
        pVisualElement->SetShowState(true);
 
        SetBackgroundColor(Color(0x00000000));
@@ -315,15 +256,6 @@ _QuickPanelFrame::SetHeight(float height)
        return r;
 }
 
-#if !defined(MULTI_WINDOW)
-_RootVisualElement*
-_QuickPanelFrame::GetRootVisualElement(void) const
-{
-       return __pQuickPanelFrameRootVisualElement;
-}
-#endif
-
-#if defined(MULTI_WINDOW)
 result
 _QuickPanelFrame::CreateLayer(void)
 {
@@ -348,80 +280,6 @@ CATCH:
 
        return r;
 }
-#endif
-
-#if !defined(MULTI_WINDOW)
-result
-_QuickPanelFrame::SetLayerShowState(bool showState)
-{
-       result r = E_SUCCESS;
-
-       _QuickPanelFrameLayer* pLayer = dynamic_cast<_QuickPanelFrameLayer*>(__pQuickPanelFrameRootVisualElement->GetNativeLayer());
-       SysTryReturn(NID_UI_CTRL, pLayer, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
-       r = pLayer->SetShowState(showState);
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
-       __pQuickPanelFrameRootVisualElement->SetShowState(showState);
-
-       return r;
-}
-
-result
-_QuickPanelFrame::SetLayerBounds(const FloatRectangle& bounds)
-{
-       _QuickPanelFrameLayer* pLayer = dynamic_cast<_QuickPanelFrameLayer*>(__pQuickPanelFrameRootVisualElement->GetNativeLayer());
-       result r = GetLastResult();
-       SysTryReturn(NID_UI_CTRL, pLayer, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
-       FloatRectangle fBounds(bounds.x, bounds.y, bounds.width, bounds.height);
-
-       pLayer->SetBounds(fBounds);
-       __pQuickPanelFrameRootVisualElement->SetBounds(fBounds);
-
-       return r;
-}
-
-
-void
-_QuickPanelFrame::OnActivated(void)
-{
-       result r = SetLayerShowState(true);
-       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-}
-
-void
-_QuickPanelFrame::OnDeactivated(void)
-{
-       result r = SetLayerShowState(false);
-       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-}
-
-void
-_QuickPanelFrame::OnBoundsChanged(void)
-{
-       Rectangle bounds = GetBounds();
-       bounds = _CoordinateSystemUtils::Transform(bounds);
-
-       SetLayerBounds(bounds);
-}
-
-void
-_QuickPanelFrame::OnBoundsChangedF(void)
-{
-       FloatRectangle boundsF = GetBoundsF();
-       boundsF = _CoordinateSystemUtils::Transform(boundsF); 
-
-       SetLayerBoundsF(boundsF);
-}
-
-void
-_QuickPanelFrame::OnVisibleStateChanged(void)
-{
-       result r = SetLayerShowState(GetVisibleState());
-       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-}
-#endif
 
 void
 _QuickPanelFrame::OnDraw(void)
index 6b9a61e..b809052 100644 (file)
@@ -164,41 +164,6 @@ _QuickPanelFrameImpl::SetHeight(float height)
        return r;
 }
 
-#if !defined(MULTI_WINDOW)
-void
-_QuickPanelFrameImpl::Rotate(_ControlRotation rotation)
-{
-       if (__rotation == rotation)
-       {
-               return;
-       }
-
-       __rotation = rotation;
-       _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT;
-       switch (__rotation)
-       {
-       case _CONTROL_ROTATION_0:
-       case _CONTROL_ROTATION_180:
-               orientation = _CONTROL_ORIENTATION_PORTRAIT;
-               break;
-       case _CONTROL_ROTATION_270:
-       case _CONTROL_ROTATION_90:
-               orientation =  _CONTROL_ORIENTATION_LANDSCAPE;
-               break;
-
-       default:
-               return;
-               break;
-       }
-
-       GetCore().ChangeLayout(orientation);
-       GetCore().UpdateLayout();
-
-       FireEvent(rotation);
-
-       RotateScreen(__rotation);
-}
-#else
 void
 _QuickPanelFrameImpl::OnRotated(_ControlRotation rotation)
 {
@@ -233,7 +198,6 @@ _QuickPanelFrameImpl::OnRotated(_ControlRotation rotation)
 
        RotateScreen(__rotation);
 }
-#endif
 
 void
 _QuickPanelFrameImpl::OnChangeLayout(_ControlOrientation orientation)
index 2452224..aaa9029 100644 (file)
@@ -64,13 +64,7 @@ public:
        result Initialize(float height);
        result SetHeight(float height);
 
-#if !defined(MULTI_WINDOW)
-       Tizen::Ui::Animations::_RootVisualElement* GetRootVisualElement(void) const;
-#endif
-
-#if defined(MULTI_WINDOW)
        virtual result CreateLayer(void);
-#endif
 
 protected:
        _QuickPanelFrame(void);
@@ -79,29 +73,10 @@ private:
        _QuickPanelFrame(const _QuickPanelFrame& rhs);
        _QuickPanelFrame& operator =(const _QuickPanelFrame&  rhs);
 
-#if !defined(MULTI_WINDOW)
-       result SetLayerShowState(bool showState);
-       result SetLayerBounds(const Tizen::Graphics::FloatRectangle& bounds);
-
-       virtual void OnActivated(void);
-       virtual void OnDeactivated(void);
-
-       // Callback
-       virtual void OnBoundsChanged(void);
-       virtual void OnBoundsChangedF(void);
-
-       virtual void OnVisibleStateChanged(void);
-
-#endif
        virtual void OnDraw(void);
 
 private:
        _QuickPanelFramePresenter* __pQuickPanelFramePresenter;
-#if !defined(MULTI_WINDOW)
-       _QuickPanelFrameLayer* __pQuickPanelFrameLayer;
-       Tizen::Ui::Animations::_RootVisualElement* __pQuickPanelFrameRootVisualElement;
-
-#endif
        Tizen::Ui::_IUiEventManager* __pEventManager;
        _QuickPanelFrameLayer* __pLayer;
        Evas_Object* pminicontrol;
index 43653f0..1e155a6 100644 (file)
@@ -55,11 +55,7 @@ public:
 
        result SetHeight(float height);
 
-#if !defined(MULTI_WINDOW)
-       void Rotate(Tizen::Ui::_ControlRotation rotation);
-#else
        virtual void OnRotated(Tizen::Ui::_ControlRotation rotation);
-#endif
 
 protected:
        _QuickPanelFrameImpl(QuickPanelFrame* pPublic, _QuickPanelFrame* pCore, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);