{\r
if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)\r
{\r
- popupRect = pPopup->GetNativeBounds(true);\r
+ popupRect = _CoordinateSystemUtils::ConvertToInteger(pPopup->GetNativeBounds(true));\r
}\r
else\r
{\r
- popupRect = pPopup->GetNativeBounds(false);\r
+ popupRect = _CoordinateSystemUtils::ConvertToInteger(pPopup->GetNativeBounds(false));\r
}\r
}\r
\r
{\r
FloatPoint winPoint = pWindow->GetPositionF();\r
\r
- Rectangle popupRect(0, 0, 0, 0);\r
+ FloatRectangle popupRect(0.0f, 0.0f, 0.0f, 0.0f);\r
_Popup* pPopup = dynamic_cast<_Popup*>(pWindow);\r
if (pPopup)\r
{\r
}\r
}\r
\r
- accumPoint.x = accumPoint.x + winPoint.x + _CoordinateSystemUtils::ConvertToFloat(popupRect).x;\r
- accumPoint.y = accumPoint.y + winPoint.y + _CoordinateSystemUtils::ConvertToFloat(popupRect).y;\r
+ accumPoint.x = accumPoint.x + winPoint.x + popupRect.x;\r
+ accumPoint.y = accumPoint.y + winPoint.y + popupRect.y;\r
}\r
\r
absoluteBounds.x = accumPoint.x;\r
result r = E_SUCCESS;
- Dimension size = _ControlManager::GetInstance()->GetScreenSize();
+ FloatDimension size = _ControlManager::GetInstance()->GetScreenSizeF();
bool oldValue = __pDimmingElement->IsImplicitAnimationEnabled();
__pDimmingElement->SetImplicitAnimationEnabled(false);
if (__pControl->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
{
- __pDimmingElement->SetBounds(Tizen::Graphics::FloatRectangle(0.0f, 0.0f, (float)size.width, (float)size.height));
+ __pDimmingElement->SetBounds(Tizen::Graphics::FloatRectangle(0.0f, 0.0f, size.width, size.height));
}
else
{
- __pDimmingElement->SetBounds(Tizen::Graphics::FloatRectangle(0.0f, 0.0f, (float)size.height, (float)size.width));
+ __pDimmingElement->SetBounds(Tizen::Graphics::FloatRectangle(0.0f, 0.0f, size.height, size.width));
}
__pDimmingElement->SetImplicitAnimationEnabled(oldValue);
_Popup* pPopup = dynamic_cast<_Popup*>(pWindow);
if (pPopup)
{
- Rectangle nativeBounds(0, 0, 0, 0);
+ FloatRectangle nativeBoundsF(0.0f, 0.0f, 0.0f, 0.0f);
if ((rotate == 0) || (rotate == 180))
{
- nativeBounds = pPopup->GetNativeBounds(true);
+ nativeBoundsF = pPopup->GetNativeBounds(true);
}
else
{
- nativeBounds = pPopup->GetNativeBounds(false);
+ nativeBoundsF = pPopup->GetNativeBounds(false);
}
- nativeBounds = _CoordinateSystemUtils::Transform(nativeBounds);
+ nativeBoundsF = _CoordinateSystemUtils::Transform(nativeBoundsF);
+ Rectangle nativeBounds = _CoordinateSystemUtils::ConvertToInteger(nativeBoundsF);
winBounds.x = nativeBounds.x;
winBounds.y = nativeBounds.y;
_Popup* pPopup = dynamic_cast<_Popup*>(pWindow);
if (pPopup)
{
- Rectangle nativeBounds(0, 0, 0, 0);
+ FloatRectangle nativeBoundsF(0.0f, 0.0f, 0.0f, 0.0f);
if ((rotate == 0) || (rotate == 180))
{
- nativeBounds = pPopup->GetNativeBounds(true);
+ nativeBoundsF = pPopup->GetNativeBounds(true);
}
else
{
- nativeBounds = pPopup->GetNativeBounds(false);
+ nativeBoundsF = pPopup->GetNativeBounds(false);
}
- nativeBounds = _CoordinateSystemUtils::Transform(nativeBounds);
+ nativeBoundsF = _CoordinateSystemUtils::Transform(nativeBoundsF);
+ Rectangle nativeBounds = _CoordinateSystemUtils::ConvertToInteger(nativeBoundsF);
winBounds.x = nativeBounds.x;
winBounds.y = nativeBounds.y;
_Popup* pPopup = dynamic_cast<_Popup*>(pWindow);
if (pPopup)
{
- Rectangle nativeBounds(0, 0, 0, 0);
+ FloatRectangle nativeBoundsF(0.0f, 0.0f, 0.0f, 0.0f);
if ((rotate == 0) || (rotate == 180))
{
- nativeBounds = pPopup->GetNativeBounds(true);
+ nativeBoundsF = pPopup->GetNativeBounds(true);
}
else
{
- nativeBounds = pPopup->GetNativeBounds(false);
+ nativeBoundsF = pPopup->GetNativeBounds(false);
}
- nativeBounds = _CoordinateSystemUtils::Transform(nativeBounds);
+ nativeBoundsF = _CoordinateSystemUtils::Transform(nativeBoundsF);
+ Rectangle nativeBounds = _CoordinateSystemUtils::ConvertToInteger(nativeBoundsF);
winBounds.x = nativeBounds.x;
winBounds.y = nativeBounds.y;
SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set rotation bounds(rot = %d, %d, %d, %d, %d).", win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
ecore_x_e_window_rotation_geometry_set(win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
}
+
+void
+_EcoreEvas::SetWindowRotationBounds(const _Window& window, int rotation, const Tizen::Graphics::FloatRectangle& bounds)
+{
+ _EflLayer* pLayer = GetEflLayer(window);
+ if (!pLayer)
+ {
+ return;
+ }
+
+ FloatRectangle winBoundsF = _CoordinateSystemUtils::Transform(bounds);
+ Rectangle winBounds = _CoordinateSystemUtils::ConvertToInteger(winBoundsF);
+
+ Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas());
+ SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set rotation bounds(rot = %d, %d, %d, %d, %d).", win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
+ ecore_x_e_window_rotation_geometry_set(win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
+}
#endif
// [ToDo] Remove API
{
if (pPopup->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
{
- popupRect = pPopup->GetNativeBounds(true);
+ popupRect = _CoordinateSystemUtils::ConvertToInteger(pPopup->GetNativeBounds(true));
}
else
{
- popupRect = pPopup->GetNativeBounds(false);
+ popupRect = _CoordinateSystemUtils::ConvertToInteger(pPopup->GetNativeBounds(false));
}
}
_MessageBox* pMsgbox = new (std::nothrow) _MessageBox();
SysTryReturn(NID_UI, pMsgbox != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- Dimension screenSize = _ControlManager::GetInstance()->GetScreenSize();
+ FloatDimension screenSize = _ControlManager::GetInstance()->GetScreenSizeF();
_Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
SysTryReturn(NID_UI_CTRL, pFrame != null, null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed.");
_Form* pForm = pFrame->GetCurrentForm();
- int portIndiHeight = 0;
- int landIndiHeight = 0;
+ float portIndiHeight = 0.0f;
+ float landIndiHeight = 0.0f;
if (pForm && pForm->IsIndicatorVisible())
{
GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, _CONTROL_ORIENTATION_LANDSCAPE, landIndiHeight);
}
- Rectangle portBounds(0, 0, screenSize.width, screenSize.height - portIndiHeight);
- Rectangle landBounds(0, 0, screenSize.width - landIndiHeight, screenSize.height);
+ FloatRectangle portBoundsF(0.0f, 0.0f, screenSize.width, screenSize.height - portIndiHeight);
+ FloatRectangle landBoundsF(0.0f, 0.0f, screenSize.width - landIndiHeight, screenSize.height);
_EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
result r = pMsgbox->CreateRootVisualElement(_WINDOW_TYPE_SUB);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- pEcoreEvas->SetWindowRotationBounds(*pMsgbox, 0, portBounds);
- pEcoreEvas->SetWindowRotationBounds(*pMsgbox, 180, portBounds);
- pEcoreEvas->SetWindowRotationBounds(*pMsgbox, 90, landBounds);
- pEcoreEvas->SetWindowRotationBounds(*pMsgbox, 270, landBounds);
+ pEcoreEvas->SetWindowRotationBounds(*pMsgbox, 0, portBoundsF);
+ pEcoreEvas->SetWindowRotationBounds(*pMsgbox, 180, portBoundsF);
+ pEcoreEvas->SetWindowRotationBounds(*pMsgbox, 90, landBoundsF);
+ pEcoreEvas->SetWindowRotationBounds(*pMsgbox, 270, landBoundsF);
// for taking touch event
pMsgbox->AcquireHandle();
, __pPopupPresenter(null)
, __bounds(0.0f, 0.0f, 0.0f, 0.0f)
, __popupResult(POPUP_RESULT_NONE)
- , __portBounds(0, 0, 0, 0)
- , __landBounds(0, 0, 0, 0)
+ , __portBounds(0.0f, 0.0f, 0.0f, 0.0f)
+ , __landBounds(0.0f, 0.0f, 0.0f, 0.0f)
{
- Dimension screenSize = _ControlManager::GetInstance()->GetScreenSize();
+ FloatDimension screenSize = _ControlManager::GetInstance()->GetScreenSizeF();
_Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
SysTryReturnVoidResult(NID_UI_CTRL, pFrame != null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed.");
GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, portIndiHeight);
GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, _CONTROL_ORIENTATION_LANDSCAPE, landIndiHeight);
}
- __portBounds = Rectangle(0, portIndiHeight, screenSize.width, screenSize.height - portIndiHeight);
- __landBounds = Rectangle(0, landIndiHeight, screenSize.height, screenSize.width - landIndiHeight);
+ __portBounds = FloatRectangle(0, portIndiHeight, screenSize.width, screenSize.height - portIndiHeight);
+ __landBounds = FloatRectangle(0, landIndiHeight, screenSize.height, screenSize.width - landIndiHeight);
}
_Popup::~_Popup(void)
_Popup* pPopup = new (std::nothrow) _Popup();
SysTryReturn(NID_UI_CTRL, pPopup != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- Dimension screenSize = _ControlManager::GetInstance()->GetScreenSize();
+ FloatDimension screenSize = _ControlManager::GetInstance()->GetScreenSizeF();
_Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
SysTryReturn(NID_UI_CTRL, pFrame != null, null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed.");
_Form* pForm = pFrame->GetCurrentForm();
- int portIndiHeight = 0;
- int landIndiHeight = 0;
+ float portIndiHeight = 0.0f;
+ float landIndiHeight = 0.0f;
if (pForm && pForm->IsIndicatorVisible())
{
GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, _CONTROL_ORIENTATION_LANDSCAPE, landIndiHeight);
}
- Rectangle portBounds(0, 0, screenSize.width, screenSize.height - portIndiHeight);
- Rectangle landBounds(0, 0, screenSize.width - landIndiHeight, screenSize.height);
+ FloatRectangle portBoundsF(0.0f, 0.0f, screenSize.width, screenSize.height - portIndiHeight);
+ FloatRectangle landBoundsF(0.0f, 0.0f, screenSize.width - landIndiHeight, screenSize.height);
_EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
result r = pPopup->CreateRootVisualElement(_WINDOW_TYPE_SUB);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- pEcoreEvas->SetWindowRotationBounds(*pPopup, 0, portBounds);
- pEcoreEvas->SetWindowRotationBounds(*pPopup, 180, portBounds);
- pEcoreEvas->SetWindowRotationBounds(*pPopup, 90, landBounds);
- pEcoreEvas->SetWindowRotationBounds(*pPopup, 270, landBounds);
+ pEcoreEvas->SetWindowRotationBounds(*pPopup, 0, portBoundsF);
+ pEcoreEvas->SetWindowRotationBounds(*pPopup, 180, portBoundsF);
+ pEcoreEvas->SetWindowRotationBounds(*pPopup, 90, landBoundsF);
+ pEcoreEvas->SetWindowRotationBounds(*pPopup, 270, landBoundsF);
// for taking touch event
pPopup->AcquireHandle();
GetEcoreEvasMgr()->GetEcoreEvas()->SetOwner(*this, *GetOwner());
- Dimension screenSize = _ControlManager::GetInstance()->GetScreenSize();
+ FloatDimension screenSize = _ControlManager::GetInstance()->GetScreenSizeF();
_Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
SysTryReturnResult(NID_UI_CTRL, pFrame != null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed.");
_Form* pForm = pFrame->GetCurrentForm();
- int portIndiHeight = 0;
- int landIndiHeight = 0;
+ float portIndiHeight = 0.0f;
+ float landIndiHeight = 0.0f;
if (pForm && pForm->IsIndicatorVisible())
{
GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, portIndiHeight);
GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, _CONTROL_ORIENTATION_LANDSCAPE, landIndiHeight);
}
- Rectangle portBounds(0, 0, screenSize.width, screenSize.height - portIndiHeight);
- Rectangle landBounds(0, 0, screenSize.width - landIndiHeight, screenSize.height);
+ FloatRectangle portBoundsF(0.0f, 0.0f, screenSize.width, screenSize.height - portIndiHeight);
+ FloatRectangle landBoundsF(0.0f, 0.0f, screenSize.width - landIndiHeight, screenSize.height);
_EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
- pEcoreEvas->SetWindowRotationBounds(*this, 0, portBounds);
- pEcoreEvas->SetWindowRotationBounds(*this, 180, portBounds);
- pEcoreEvas->SetWindowRotationBounds(*this, 90, landBounds);
- pEcoreEvas->SetWindowRotationBounds(*this, 270, landBounds);
+ pEcoreEvas->SetWindowRotationBounds(*this, 0, portBoundsF);
+ pEcoreEvas->SetWindowRotationBounds(*this, 180, portBoundsF);
+ pEcoreEvas->SetWindowRotationBounds(*this, 90, landBoundsF);
+ pEcoreEvas->SetWindowRotationBounds(*this, 270, landBoundsF);
- __portBounds = Rectangle(0, portIndiHeight, screenSize.width, screenSize.height - portIndiHeight);
- __landBounds = Rectangle(0, landIndiHeight, screenSize.height, screenSize.width - landIndiHeight);
+ __portBounds = FloatRectangle(0, portIndiHeight, screenSize.width, screenSize.height - portIndiHeight);
+ __landBounds = FloatRectangle(0, landIndiHeight, screenSize.height, screenSize.width - landIndiHeight);
return E_SUCCESS;
}
return true;
}
-Rectangle
+FloatRectangle
_Popup::GetNativeBounds(bool isPortrait) const
{
if (isPortrait)
_ProgressPopup* pProgressPopup = new (std::nothrow) _ProgressPopup();
SysTryReturn(NID_UI_CTRL, pProgressPopup != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- Dimension screenSize = _ControlManager::GetInstance()->GetScreenSize();
+ FloatDimension screenSize = _ControlManager::GetInstance()->GetScreenSizeF();
_Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
SysTryReturn(NID_UI_CTRL, pFrame != null, null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed.");
_Form* pForm = pFrame->GetCurrentForm();
- int portIndiHeight = 0;
- int landIndiHeight = 0;
+ float portIndiHeight = 0.0f;
+ float landIndiHeight = 0.0f;
if (pForm && pForm->IsIndicatorVisible())
{
GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, _CONTROL_ORIENTATION_LANDSCAPE, landIndiHeight);
}
- Rectangle portBounds(0, 0, screenSize.width, screenSize.height - portIndiHeight);
- Rectangle landBounds(0, 0, screenSize.width - landIndiHeight, screenSize.height);
+ FloatRectangle portBoundsF(0.0f, 0.0f, screenSize.width, screenSize.height - portIndiHeight);
+ FloatRectangle landBoundsF(0.0f, 0.0f, screenSize.width - landIndiHeight, screenSize.height);
_EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds);
virtual bool IsRotationSynchronized(void) const;
- Tizen::Graphics::Rectangle GetNativeBounds(bool isPortrait) const;
+ Tizen::Graphics::FloatRectangle GetNativeBounds(bool isPortrait) const;
// Accessor
public:
PopupModalResult __popupResult;
- Tizen::Graphics::Rectangle __portBounds;
- Tizen::Graphics::Rectangle __landBounds;
+ Tizen::Graphics::FloatRectangle __portBounds;
+ Tizen::Graphics::FloatRectangle __landBounds;
}; // _Popup
void SetWindowAvailabledRotation(const _Window& window, int* rotations, unsigned int count);
void RegisterWindowStateCallback(const _Window& window);
void SetWindowRotationBounds(const _Window& window, int rotation, const Tizen::Graphics::Rectangle& bounds);
+ void SetWindowRotationBounds(const _Window& window, int rotation, const Tizen::Graphics::FloatRectangle& bounds);
#else
void SetWindowOrientationEnabled(const _Window& window, bool enable);
#endif