From 08f4d4724a210e6be4fb95633511dbf3dccf740b Mon Sep 17 00:00:00 2001 From: Choi Munseok Date: Fri, 6 Sep 2013 13:50:52 +0900 Subject: [PATCH] Apply Split Window(disable) Change-Id: I11ed6fce424de858f622e8195f23b5c643f3c70c Signed-off-by: Choi Munseok --- src/ui/FUi_EcoreEvas.cpp | 49 ++++++++++++++++++++++++++++++++++++++- src/ui/FUi_Window.cpp | 27 +++++++++++++++++++++ src/ui/controls/FUiCtrl_Frame.cpp | 9 +++++++ src/ui/inc/FUiCtrl_Frame.h | 1 + src/ui/inc/FUi_Types.h | 2 ++ 5 files changed, 87 insertions(+), 1 deletion(-) diff --git a/src/ui/FUi_EcoreEvas.cpp b/src/ui/FUi_EcoreEvas.cpp index 76c9b47..1f51c0a 100644 --- a/src/ui/FUi_EcoreEvas.cpp +++ b/src/ui/FUi_EcoreEvas.cpp @@ -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][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] 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; diff --git a/src/ui/FUi_Window.cpp b/src/ui/FUi_Window.cpp index 3fdc00a..ce7bc76 100644 --- a/src/ui/FUi_Window.cpp +++ b/src/ui/FUi_Window.cpp @@ -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][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] 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; } } diff --git a/src/ui/controls/FUiCtrl_Frame.cpp b/src/ui/controls/FUiCtrl_Frame.cpp index 2baea8f..9141e7d 100644 --- a/src/ui/controls/FUiCtrl_Frame.cpp +++ b/src/ui/controls/FUiCtrl_Frame.cpp @@ -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 { diff --git a/src/ui/inc/FUiCtrl_Frame.h b/src/ui/inc/FUiCtrl_Frame.h index 1bd7bb9..8e634df 100644 --- a/src/ui/inc/FUiCtrl_Frame.h +++ b/src/ui/inc/FUiCtrl_Frame.h @@ -100,6 +100,7 @@ public: // Internal void SetChangingBoundsEnabled(bool enable); + void SetSplitWindowEnabled(bool enable); protected: result SetPresenter(const _FramePresenter& framePresenter); diff --git a/src/ui/inc/FUi_Types.h b/src/ui/inc/FUi_Types.h index 00b4ace..07e6307 100644 --- a/src/ui/inc/FUi_Types.h +++ b/src/ui/inc/FUi_Types.h @@ -23,6 +23,8 @@ #include #include +//#define _SPLIT_WINDOW_ + namespace Tizen { namespace Ui { -- 2.7.4