}
void
+_EcoreEvas::SetWindowBounds(const _Window& window, const FloatRectangle& bounds)
+{
+ if (__changeBounds == false)
+ {
+ return;
+ }
+
+ _EflLayer* pLayer = GetEflLayer(window);
+ SysTryReturnVoidResult(NID_UI, pLayer, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer.");
+
+ Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas();
+ Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas);
+
+ Evas_Object* pWinObject = pLayer->GetElmWin();
+ SysTryReturnVoidResult(NID_UI, pWinObject, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+ FloatRectangle winBoundsF = _CoordinateSystemUtils::Transform(bounds);
+ Rectangle winBounds = _CoordinateSystemUtils::ConvertToInteger(winBoundsF);
+
+ int winX = winBounds.x;
+ int winY = winBounds.y;
+
+ int rootW = 0;
+ int rootH = 0;
+ ecore_x_window_size_get(ecore_x_window_root_get(win), &rootW, &rootH);
+
+ int rotate = ecore_evas_rotation_get(pEcoreEvas);
+ switch (rotate)
+ {
+ case 270:
+ winX = rootW - winBounds.y - winBounds.height;
+ winY = winBounds.x;
+ break;
+ case 90:
+ winX = winBounds.y;
+ winY = rootH - winBounds.x - winBounds.width;
+ break;
+ case 180:
+ winX = rootW - winBounds.x - winBounds.width;
+ winY = rootH - winBounds.y - winBounds.height;
+ break;
+ default:
+ break;
+ }
+
+ evas_object_move(pWinObject, winX, winY);
+ evas_object_resize(pWinObject, winBounds.width, winBounds.height);
+
+ SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
+
+ SetLastResult(E_SUCCESS);
+}
+
+void
_EcoreEvas::SetWindowVisibleState(const _Window& window, bool visibleState)
{
_EflLayer* pLayer = GetEflLayer(window);
}
result
-_Window::OnBoundsChanging(const Rectangle& bounds)
+_Window::OnBoundsChanging(const FloatRectangle& bounds)
{
_EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
r = _ControlImpl::CheckConstruction(pCore, pImpl);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
- pCore->SetSize(_ControlManager::GetInstance()->GetScreenSize());
+ pCore->SetSize(_ControlManager::GetInstance()->GetScreenSizeF());
pCore->AddFrameEventListener(*pImpl);
_ControlManager* pCoreManager = _ControlManager::GetInstance();
SysAssert(pCoreManager);
- const Dimension& screenSize = pCoreManager->GetScreenSize();
+ const FloatDimension& screenSize = pCoreManager->GetScreenSizeF();
if (GetCore().GetShowMode() == FRAME_SHOW_MODE_FULL_SCREEN)
{
}
else
{
- SetSize(Dimension(screenSize.height, screenSize.width));
+ SetSize(FloatDimension(screenSize.height, screenSize.width));
}
}
namespace Tizen { namespace Graphics
{
class Rectangle;
+class FloatRectangle;
}} // Tizen::Graphics
namespace Tizen { namespace Ui { namespace Animations
void SetWindowLevel(const _Window& window, _WindowLevel level);
_WindowLevel GetWindowLevel(const _Window& window) const;
void SetWindowBounds(const _Window& window, const Tizen::Graphics::Rectangle& bounds);
+ void SetWindowBounds(const _Window& window, const Tizen::Graphics::FloatRectangle& bounds);
void SetWindowVisibleState(const _Window& window, bool visibleState);
void AllowSetWindowBounds(bool allow);
bool IsWindowVisible(const _Window& window);
virtual void OnOwnerChanged(_Control* pOldOwner);
virtual void OnVisibleStateChanged(void);
virtual bool OnNotifiedN(const Tizen::Ui::_Control& source, Tizen::Base::Collection::IList* pArgs);
- virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds);
+ virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds);
virtual result OnAttachingToMainTree(const _Control* pParent);
virtual result OnDetachingFromMainTree(void);
#if defined(WINDOW_BASE_ROTATE)