Apply Split Window(disable)
authorChoi Munseok <ms47.choi@samsung.com>
Fri, 6 Sep 2013 04:50:52 +0000 (13:50 +0900)
committerChoi Munseok <ms47.choi@samsung.com>
Fri, 6 Sep 2013 04:50:52 +0000 (13:50 +0900)
Change-Id: I11ed6fce424de858f622e8195f23b5c643f3c70c
Signed-off-by: Choi Munseok <ms47.choi@samsung.com>
src/ui/FUi_EcoreEvas.cpp
src/ui/FUi_Window.cpp
src/ui/controls/FUiCtrl_Frame.cpp
src/ui/inc/FUiCtrl_Frame.h
src/ui/inc/FUi_Types.h

index 76c9b47..1f51c0a 100644 (file)
@@ -384,10 +384,32 @@ OnWindowConfigured(void* pData, int type, void* pEvent)
        Ecore_X_Window targetWin = pE->win;
        _Frame* pFrame = static_cast<_Frame*>(pCurFrame);
        Ecore_X_Window win = (Ecore_X_Window)pFrame->GetNativeHandle();
+       Dimension screenSize = pControlManager->GetScreenSize();
+
+#if defined(_SPLIT_WINDOW_)
+       if (win != targetWin)
+       {
+               return ECORE_CALLBACK_PASS_ON;
+       }
+
+       if (pFrame->GetShowMode() == FRAME_SHOW_MODE_FULL_SCREEN)
+       {
+               Dimension winSize = _CoordinateSystemUtils::InverseTransform(Dimension(pE->w, pE->h));
+               if (winSize == screenSize)
+               {
+                       return ECORE_CALLBACK_PASS_ON;
+               }
+               else
+               {
+                       pFrame->SetSplitWindowEnabled(true);
+               }
+       }
+#else
        if ((pFrame->GetShowMode() == FRAME_SHOW_MODE_FULL_SCREEN) || (win != targetWin))
        {
                return ECORE_CALLBACK_PASS_ON;
        }
+#endif
 
        Rectangle winBounds = _CoordinateSystemUtils::InverseTransform(Rectangle(pE->x, pE->y, pE->w, pE->h));
        Rectangle newBounds(winBounds.x, winBounds.y, winBounds.width, winBounds.height);
@@ -398,7 +420,6 @@ OnWindowConfigured(void* pData, int type, void* pEvent)
                newBounds.height = winBounds.width;
        }
 
-       Dimension screenSize = pControlManager->GetScreenSize();
        switch (rotation)
        {
        case 270:
@@ -428,6 +449,32 @@ OnWindowConfigured(void* pData, int type, void* pEvent)
                pFrame->SetBounds(newBounds);
                pFrame->SetChangedPositionByUser(isChanged);
                pFrame->SetChangingBoundsEnabled(true);
+
+#if defined(_SPLIT_WINDOW_)
+               Rectangle frameBounds = pFrame->GetBounds();
+               Rectangle frameClientBounds = pFrame->GetClientBounds();
+               Rectangle frameAbsoluteBounds = pFrame->GetAbsoluteBounds();
+
+               SysLog(NID_UI, "[WM ROTATION]<S>[WIN 0x%x] FRAME bounds(%d %d %d %d) cbounds(%d %d %d %d) abounds(%d %d %d %d)",
+                       win, frameBounds.x, frameBounds.y, frameBounds.width, frameBounds.height,
+                       frameClientBounds.x, frameClientBounds.y, frameClientBounds.width, frameClientBounds.height,
+                       frameAbsoluteBounds.x, frameAbsoluteBounds.y, frameAbsoluteBounds.width, frameAbsoluteBounds.height);
+
+               int formCount = pFrame->GetChildCount();
+               for (int i = 0 ; i < formCount ; i++)
+               {
+                       _Control* pForm = pFrame->GetChild(i);
+
+                       Rectangle formBounds = pForm->GetBounds();
+                       Rectangle formClientBounds = pForm->GetClientBounds();
+                       Rectangle formAbsoluteBounds = pForm->GetAbsoluteBounds();
+                       
+                       SysLog(NID_UI, "[WM ROTATION]<S> FORM bounds(%d %d %d %d) cbounds(%d %d %d %d) abounds(%d %d %d %d)",
+                               formBounds.x, formBounds.y, formBounds.width, formBounds.height,
+                               formClientBounds.x, formClientBounds.y, formClientBounds.width, formClientBounds.height,
+                               formAbsoluteBounds.x, formAbsoluteBounds.y, formAbsoluteBounds.width, formAbsoluteBounds.height);
+               }
+#endif
        }
 
        return ECORE_CALLBACK_PASS_ON;
index 3fdc00a..ce7bc76 100644 (file)
@@ -706,6 +706,33 @@ _Window::OnWindowStateChanged(void)
                                        pFormImpl->UpdateOrientation();
                                }
 
+#if defined(_SPLIT_WINDOW_)
+                               Rectangle frameBounds = GetBounds();
+                               Rectangle frameClientBounds = GetClientBounds();
+                               Rectangle frameAbsoluteBounds = GetAbsoluteBounds();
+               
+                               SysLog(NID_UI, "[WM ROTATION]<S>[WIN 0x%x] FRAME bounds(%d %d %d %d) cbounds(%d %d %d %d) abounds(%d %d %d %d)",
+                                       GetNativeHandle(),
+                                       frameBounds.x, frameBounds.y, frameBounds.width, frameBounds.height,
+                                       frameClientBounds.x, frameClientBounds.y, frameClientBounds.width, frameClientBounds.height,
+                                       frameAbsoluteBounds.x, frameAbsoluteBounds.y, frameAbsoluteBounds.width, frameAbsoluteBounds.height);
+               
+                               int formCount = GetChildCount();
+                               for (int i = 0 ; i < formCount ; i++)
+                               {
+                                       _Control* pForm = GetChild(i);
+               
+                                       Rectangle formBounds = pForm->GetBounds();
+                                       Rectangle formClientBounds = pForm->GetClientBounds();
+                                       Rectangle formAbsoluteBounds = pForm->GetAbsoluteBounds();
+                                       
+                                       SysLog(NID_UI, "[WM ROTATION]<S> FORM bounds(%d %d %d %d) cbounds(%d %d %d %d) abounds(%d %d %d %d)",
+                                               formBounds.x, formBounds.y, formBounds.width, formBounds.height,
+                                               formClientBounds.x, formClientBounds.y, formClientBounds.width, formClientBounds.height,
+                                               formAbsoluteBounds.x, formAbsoluteBounds.y, formAbsoluteBounds.width, formAbsoluteBounds.height);
+                               }
+#endif
+
                                return;
                        }
                }
index 2baea8f..9141e7d 100644 (file)
@@ -1011,6 +1011,15 @@ _Frame::SetChangingBoundsEnabled(bool enable)
        __changingBoundsEnabled = enable;
 }
 
+void
+_Frame::SetSplitWindowEnabled(bool enable)
+{
+       if (enable == true)
+       {
+               __showMode = FRAME_SHOW_MODE_PARTIAL_SCREEN;
+       }
+}
+
 Tizen::Base::Collection::IListT<_Control*>*
 _Frame::GetFocusList(void) const
 {
index 1bd7bb9..8e634df 100644 (file)
@@ -100,6 +100,7 @@ public:
 
 // Internal
        void SetChangingBoundsEnabled(bool enable);
+       void SetSplitWindowEnabled(bool enable);
 
 protected:
        result SetPresenter(const _FramePresenter& framePresenter);
index 00b4ace..07e6307 100644 (file)
@@ -23,6 +23,8 @@
 #include <FGrpDimension.h>
 #include <FBase_ObjectManagerT.h>
 
+//#define _SPLIT_WINDOW_
+
 namespace Tizen { namespace Ui
 {