Fixed build error
authorHeeJu Kang <mobum.kang@samsung.com>
Fri, 4 Jan 2013 08:55:21 +0000 (17:55 +0900)
committerHeeJu Kang <mobum.kang@samsung.com>
Fri, 4 Jan 2013 08:55:21 +0000 (17:55 +0900)
Change-Id: I7a8b0cc24d67ac751b1915fd704c5496d61923cb
Signed-off-by: HeeJu Kang <mobum.kang@samsung.com>
src/FShell_LiveboxFrame.cpp
src/FShell_LiveboxFrame.h
src/FShell_LiveboxPopup.cpp
src/FShell_LiveboxPopup.h

index 8a0508f..4e7d5cb 100644 (file)
@@ -108,8 +108,19 @@ _LiveboxFrame::Initialize(const Dimension& 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<_LiveboxLayer> pLayer(new (std::nothrow) _LiveboxLayer(*this));\r
+       SysTryReturn(NID_UI_CTRL, pLayer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");\r
+\r
+       pLayer->Construct();\r
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
+\r
+       __pLiveboxLayer = move(pLayer);\r
+       __pLiveboxFrameRootVisualElement = __pLiveboxLayer->GetRootVisualElement();
+#endif // MULTI_WINDOW
 
        Rectangle bounds(0, 0, liveboxSize.width, liveboxSize.height);
        r = SetBounds(bounds);
@@ -199,6 +210,7 @@ _LiveboxFrame::SetLayerBounds(const Rectangle& bounds)
        return r;
 }
 
+#if defined(MULTI_WINDOW)
 result
 _LiveboxFrame::CreateLayer(void)
 {
@@ -216,6 +228,7 @@ _LiveboxFrame::CreateLayer(void)
 
        return r;
 }
+#endif // MULTI_WINDOW
 
 void
 _LiveboxFrame::OnActivated(void)
index 7e7cad3..eaaadfe 100644 (file)
@@ -69,7 +69,9 @@ private:
        result SetLayerShowState(bool showState);
        result SetLayerBounds(const Tizen::Graphics::Rectangle& bounds);
 
+#if defined(MULTI_WINDOW)
        virtual result CreateLayer(void);
+#endif // MULTI_WINDOW
        virtual void OnActivated(void);
        virtual void OnDeactivated(void);
        virtual void OnBoundsChanged(void);
index 9ab679f..3fd89a9 100644 (file)
@@ -184,12 +184,22 @@ _LiveboxPopup::Initialize(const Tizen::Graphics::Dimension& size)
        SysLog(NID_UI_CTRL, "(%d %d) %lld", size.width, size.height, ticks);
 
        result r = E_SUCCESS;
-       _VisualElement* pVisualElement = null;
 
        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(*this));\r
+       SysTryReturn(NID_UI_CTRL, pLayer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");\r
+\r
+       r = pLayer->Construct();\r
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
+\r
+       __pLiveboxPopupLayer = move(pLayer);\r
+       __pLiveboxPopupRootVisualElement = __pLiveboxPopupLayer->GetRootVisualElement();
+#endif // MULTI_WINDOW
 
        Rectangle bounds(0, 0, size.width, size.height);
        r = SetBounds(bounds);
@@ -208,7 +218,7 @@ _LiveboxPopup::Initialize(const Tizen::Graphics::Dimension& size)
        __pLiveboxPopupRootVisualElement->SetBounds(fBounds);
        __pLiveboxPopupRootVisualElement->SetShowState(false);
 
-       pVisualElement = GetVisualElement();
+       _VisualElement* pVisualElement = GetVisualElement();
        r = GetLastResult();
        SysTryReturn(NID_UI_CTRL, pVisualElement, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -280,6 +290,7 @@ _LiveboxPopup::SetLayerBounds(const Rectangle& bounds)
        return r;
 }
 
+#if defined(MULTI_WINDOW)
 result
 _LiveboxPopup::CreateLayer(void)
 {
@@ -297,6 +308,7 @@ _LiveboxPopup::CreateLayer(void)
 
        return r;
 }
+#endif // MULTI_WINDOW
 
 void
 _LiveboxPopup::OnActivated(void)
index 020c640..ed0f1a7 100644 (file)
@@ -69,7 +69,9 @@ private:
        result SetLayerShowState(bool showState);
        result SetLayerBounds(const Tizen::Graphics::Rectangle& bounds);
 
+#if defined(MULTI_WINDOW)
        virtual result CreateLayer(void);
+#endif // MULTI_WINDOW
        virtual void OnActivated(void);
        virtual void OnDeactivated(void);
        virtual void OnBoundsChanged(void);