X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fcommon%2Fwindow-impl.cpp;h=a309df3155ddf81eae21d23704f16b4d3e60546b;hb=f79805402bf8bd9b7ceb4561d4c089411fb5927f;hp=794438d1809d2bd82d2de7ecc2bd67a2802dfe4b;hpb=a2c7537e6086877ff6c3373b476ff86564df6a4c;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index 794438d..a309df3 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,10 @@ // EXTERNAL HEADERS #include +#include #include #include +#include #include #include #include @@ -56,7 +58,6 @@ namespace #if defined(DEBUG_ENABLED) Debug::Filter* gWindowLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_WINDOW"); #endif - } // unnamed namespace Window* Window::New(const PositionSize& positionSize, const std::string& name, const std::string& className, Dali::WindowType type, bool isTransparent) @@ -76,26 +77,32 @@ Window* Window::New(Any surface, const PositionSize& positionSize, const std::st Window::Window() : mWindowSurface(nullptr), mWindowBase(), - mIsTransparent(false), - mIsFocusAcceptable(true), - mIconified(false), - mOpaqueState(false), - mWindowRotationAcknowledgement(false), - mFocused(false), mParentWindow(NULL), mPreferredAngle(static_cast(WindowOrientation::NO_ORIENTATION_PREFERENCE)), mRotationAngle(0), mWindowWidth(0), mWindowHeight(0), - mOrientationMode(Internal::Adaptor::Window::OrientationMode::PORTRAIT), mNativeWindowId(-1), + mOrientationMode(Internal::Adaptor::Window::OrientationMode::PORTRAIT), mDeleteRequestSignal(), mFocusChangeSignal(), mResizeSignal(), mVisibilityChangedSignal(), mTransitionEffectEventSignal(), mKeyboardRepeatSettingsChangedSignal(), - mAuxiliaryMessageSignal() + mAuxiliaryMessageSignal(), + mMovedSignal(), + mOrientationChangedSignal(), + mLastKeyEvent(), + mLastTouchEvent(), + mIsTransparent(false), + mIsFocusAcceptable(true), + mIconified(false), + mMaximized(false), + mOpaqueState(false), + mWindowRotationAcknowledgement(false), + mFocused(false), + mIsWindowRotating(false) { } @@ -105,8 +112,10 @@ Window::~Window() { auto bridge = Accessibility::Bridge::GetCurrentBridge(); auto rootLayer = mScene.GetRootLayer(); - auto accessible = Accessibility::Accessible::Get(rootLayer, true); + auto accessible = Accessibility::Accessible::Get(rootLayer); bridge->RemoveTopLevelWindow(accessible); + // Related to multi-window case. This is called for default window and non-default window, but it is effective for non-default window. + bridge->Emit(accessible, Accessibility::WindowEvent::DESTROY); } if(mAdaptor) @@ -142,6 +151,7 @@ void Window::Initialize(Any surface, const PositionSize& positionSize, const std // Connect signals mWindowBase->IconifyChangedSignal().Connect(this, &Window::OnIconifyChanged); + mWindowBase->MaximizeChangedSignal().Connect(this, &Window::OnMaximizeChanged); mWindowBase->FocusChangedSignal().Connect(this, &Window::OnFocusChanged); mWindowBase->DeleteRequestSignal().Connect(this, &Window::OnDeleteRequest); mWindowBase->TransitionEffectEventSignal().Connect(this, &Window::OnTransitionEffectEvent); @@ -151,6 +161,7 @@ void Window::Initialize(Any surface, const PositionSize& positionSize, const std mWindowBase->AuxiliaryMessageSignal().Connect(this, &Window::OnAuxiliaryMessage); mWindowSurface->OutputTransformedSignal().Connect(this, &Window::OnOutputTransformed); + mWindowSurface->RotationFinishedSignal().Connect(this, &Window::OnRotationFinished); AddAuxiliaryHint("wm.policy.win.user.geometry", "1"); @@ -169,10 +180,32 @@ void Window::Initialize(Any surface, const PositionSize& positionSize, const std { mOrientationMode = Internal::Adaptor::Window::OrientationMode::PORTRAIT; } + + if(positionSize.width <= 0 || positionSize.height <= 0) + { + mWindowWidth = screenWidth; + mWindowHeight = screenHeight; + } + else + { + mWindowWidth = positionSize.width; + mWindowHeight = positionSize.height; + } + // For Debugging mNativeWindowId = mWindowBase->GetNativeWindowId(); } +void Window::SetRenderNotification(TriggerEventInterface *renderNotification) +{ + if(!mWindowSurface) + { + return; + } + + mWindowSurface->SetRenderNotification(renderNotification); +} + void Window::OnAdaptorSet(Dali::Adaptor& adaptor) { mEventHandler = EventHandlerPtr(new EventHandler(mWindowSurface->GetWindowBase(), *mAdaptor)); @@ -180,11 +213,15 @@ void Window::OnAdaptorSet(Dali::Adaptor& adaptor) // Add Window to bridge for ATSPI auto bridge = Accessibility::Bridge::GetCurrentBridge(); - if (bridge->IsUp()) + if(bridge->IsUp()) { auto rootLayer = mScene.GetRootLayer(); - auto accessible = Accessibility::Accessible::Get(rootLayer, true); + auto accessible = Accessibility::Accessible::Get(rootLayer); bridge->AddTopLevelWindow(accessible); + + // Emit Window create event + // Create and Destory signal only emit in multi-window environment, so it does not emit on default layer. + bridge->Emit(accessible, Accessibility::WindowEvent::CREATE); } bridge->EnabledSignal().Connect(this, &Window::OnAccessibilityEnabled); @@ -251,6 +288,11 @@ bool Window::IsMaximized() const return mWindowBase->IsMaximized(); } +void Window::SetMaximumSize(Dali::Window::WindowSize size) +{ + mWindowBase->SetMaximumSize(size); +} + void Window::Minimize(bool minimize) { mWindowBase->Minimize(minimize); @@ -263,6 +305,11 @@ bool Window::IsMinimized() const return mWindowBase->IsMinimized(); } +void Window::SetMimimumSize(Dali::Window::WindowSize size) +{ + mWindowBase->SetMimimumSize(size); +} + uint32_t Window::GetLayerCount() const { return mScene.GetLayerCount(); @@ -346,7 +393,6 @@ void Window::SetPreferredOrientation(WindowOrientation orientation) WindowOrientation Window::GetPreferredOrientation() { - DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), GetPreferredOrientation: %d\n", this, mNativeWindowId, mPreferredAngle); WindowOrientation preferredOrientation = ConvertToOrientation(mPreferredAngle); return preferredOrientation; } @@ -357,6 +403,12 @@ void Window::SetPositionSizeWithOrientation(PositionSize positionSize, WindowOri mWindowBase->SetPositionSizeWithAngle(positionSize, angle); } +void Window::EmitAccessibilityHighlightSignal(bool highlight) +{ + Dali::Window handle(this); + mAccessibilityHighlightSignal.Emit(handle, highlight); +} + void Window::SetAvailableAnlges(const std::vector& angles) { if(angles.size() > 4) @@ -635,22 +687,27 @@ int Window::GetBrightness() const void Window::SetSize(Dali::Window::WindowSize size) { - PositionSize oldRect = mSurface->GetPositionSize(); - - mWindowSurface->MoveResize(PositionSize(oldRect.x, oldRect.y, size.GetWidth(), size.GetHeight())); + PositionSize oldRect = GetPositionSize(); - PositionSize newRect = mSurface->GetPositionSize(); + PositionSize newRect; + newRect.width = size.GetWidth(); + newRect.height = size.GetHeight(); // When surface size is updated, inform adaptor of resizing and emit ResizeSignal if((oldRect.width != newRect.width) || (oldRect.height != newRect.height)) { + mWindowSurface->MoveResize(PositionSize(oldRect.x, oldRect.y, newRect.width, newRect.height)); + Uint16Pair newSize(newRect.width, newRect.height); - SurfaceResized(); + mWindowWidth = newRect.width; + mWindowHeight = newRect.height; - mAdaptor->SurfaceResizePrepare(mSurface.get(), newSize); + DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), current angle (%d), SetSize(): (%d, %d), [%d x %d]\n", this, mNativeWindowId, mRotationAngle, oldRect.x, oldRect.y, newRect.width, newRect.height); - DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), SetSize(): resize signal [%d x %d]\n", this, mNativeWindowId, newRect.width, newRect.height); + SurfaceResized(static_cast(mWindowWidth), static_cast(mWindowHeight)); + + mAdaptor->SurfaceResizePrepare(mSurface.get(), newSize); Dali::Window handle(this); mResizeSignal.Emit(handle, newSize); @@ -660,65 +717,107 @@ void Window::SetSize(Dali::Window::WindowSize size) mSurface->SetFullSwapNextFrame(); - Dali::Accessibility::Accessible::Get(mScene.GetRootLayer(), true)->EmitBoundsChanged(Dali::Rect<>(oldRect.x, oldRect.y, size.GetWidth(), size.GetHeight())); + Dali::Accessibility::Accessible::Get(mScene.GetRootLayer())->EmitBoundsChanged(Dali::Rect<>(oldRect.x, oldRect.y, size.GetWidth(), size.GetHeight())); } Dali::Window::WindowSize Window::GetSize() const { - PositionSize positionSize = mSurface->GetPositionSize(); - - return Dali::Window::WindowSize(positionSize.width, positionSize.height); + return Dali::Window::WindowSize(mWindowWidth, mWindowHeight); } void Window::SetPosition(Dali::Window::WindowPosition position) { PositionSize oldRect = mSurface->GetPositionSize(); + int32_t newX = position.GetX(); + int32_t newY = position.GetY(); + + mWindowSurface->Move(PositionSize(newX, newY, oldRect.width, oldRect.height)); - mWindowSurface->MoveResize(PositionSize(position.GetX(), position.GetY(), oldRect.width, oldRect.height)); + if((oldRect.x != newX) || (oldRect.y != newY)) + { + Dali::Window handle(this); + Dali::Window::WindowPosition newPosition(newX, newY); + + DALI_LOG_RELEASE_INFO("send moved signal with new position: %d, %d\n", newPosition.GetX(), newPosition.GetY()); + mMovedSignal.Emit(handle, newPosition); + } mSurface->SetFullSwapNextFrame(); - Dali::Accessibility::Accessible::Get(mScene.GetRootLayer(), true)->EmitBoundsChanged(Dali::Rect<>(position.GetX(), position.GetY(), oldRect.width, oldRect.height)); + Dali::Accessibility::Accessible::Get(mScene.GetRootLayer())->EmitBoundsChanged(Dali::Rect<>(position.GetX(), position.GetY(), oldRect.width, oldRect.height)); } Dali::Window::WindowPosition Window::GetPosition() const { - PositionSize positionSize = mSurface->GetPositionSize(); - + PositionSize positionSize = GetPositionSize(); return Dali::Window::WindowPosition(positionSize.x, positionSize.y); } PositionSize Window::GetPositionSize() const { - return mSurface->GetPositionSize(); + PositionSize positionSize = mSurface->GetPositionSize(); + positionSize.width = mWindowWidth; + positionSize.height = mWindowHeight; + return positionSize; } void Window::SetPositionSize(PositionSize positionSize) { - PositionSize oldRect = mSurface->GetPositionSize(); + bool moved = false; + bool resize = false; - mWindowSurface->MoveResize(positionSize); + PositionSize oldRect = GetPositionSize(); + Dali::Window handle(this); + + if((oldRect.x != positionSize.x) || (oldRect.y != positionSize.y)) + { + moved = true; + } + + if((oldRect.width != positionSize.width) || (oldRect.height != positionSize.height)) + { + resize = true; + } + + if(moved || resize) + { + mWindowSurface->MoveResize(positionSize); + } - PositionSize newRect = mSurface->GetPositionSize(); + // When window is moved, emit Moved Signal + if(moved) + { + DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Moved signal emit (%d, %d)\n", this, mNativeWindowId, positionSize.x, positionSize.y); + Dali::Window::WindowPosition position(positionSize.x, positionSize.y); + mMovedSignal.Emit(handle, position); + } // When surface size is updated, inform adaptor of resizing and emit ResizeSignal - if((oldRect.width != newRect.width) || (oldRect.height != newRect.height)) + if(resize) { - Uint16Pair newSize(newRect.width, newRect.height); + Uint16Pair newSize(positionSize.width, positionSize.height); - SurfaceResized(); + mWindowWidth = positionSize.width; + mWindowHeight = positionSize.height; + + SurfaceResized(static_cast(mWindowWidth), static_cast(mWindowHeight)); mAdaptor->SurfaceResizePrepare(mSurface.get(), newSize); - DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), SetPositionSize():resize signal [%d x %d]\n", this, mNativeWindowId, newRect.width, newRect.height); - Dali::Window handle(this); + DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Resize signal emit [%d x %d]\n", this, mNativeWindowId, positionSize.width, positionSize.height); + mResizeSignal.Emit(handle, newSize); mAdaptor->SurfaceResizeComplete(mSurface.get(), newSize); } mSurface->SetFullSwapNextFrame(); - Dali::Accessibility::Accessible::Get(mScene.GetRootLayer(), true)->EmitBoundsChanged(Dali::Rect<>(positionSize.x, positionSize.y, positionSize.width, positionSize.height)); + Dali::Accessibility::Accessible::Get(mScene.GetRootLayer())->EmitBoundsChanged(Dali::Rect<>(positionSize.x, positionSize.y, positionSize.width, positionSize.height)); +} + +void Window::SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan) +{ + mWindowBase->SetLayout(numCols, numRows, column, row, colSpan, rowSpan); } Dali::Layer Window::GetRootLayer() const @@ -753,20 +852,28 @@ bool Window::UngrabKeyList(const Dali::Vector& key, Dali::VectorWindowHidden(handle); + bridge->WindowHidden(handle); WindowVisibilityObserver* observer(mAdaptor); observer->OnWindowHidden(); } + if(isActuallyChanged) + { + bridge->WindowMinimized(handle); + } + DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Iconified: visible = %d\n", this, mNativeWindowId, mVisible); } else @@ -775,47 +882,71 @@ void Window::OnIconifyChanged(bool iconified) if(mVisible) { - Dali::Window handle(this); mVisibilityChangedSignal.Emit(handle, true); - Dali::Accessibility::Bridge::GetCurrentBridge()->WindowShown(handle); + bridge->WindowShown(handle); WindowVisibilityObserver* observer(mAdaptor); observer->OnWindowShown(); } + if(isActuallyChanged) + { + bridge->WindowRestored(handle, Dali::Accessibility::WindowRestoreType::RESTORE_FROM_ICONIFY); + } + DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Deiconified: visible = %d\n", this, mNativeWindowId, mVisible); } mSurface->SetFullSwapNextFrame(); } -void Window::OnFocusChanged(bool focusIn) +void Window::OnMaximizeChanged(bool maximized) { - Dali::Window handle(this); - mFocusChangeSignal.Emit(handle, focusIn); - - mSurface->SetFullSwapNextFrame(); + const bool isActuallyChanged = (maximized != mMaximized); - if(auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge()) + if(isActuallyChanged) { - if(focusIn) + auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge(); + Dali::Window handle(this); + + if(maximized) { - bridge->WindowFocused(handle); + mMaximized = true; + bridge->WindowMaximized(handle); } else { - bridge->WindowUnfocused(handle); + mMaximized = false; + bridge->WindowRestored(handle, Dali::Accessibility::WindowRestoreType::RESTORE_FROM_MAXIMIZE); } } +} + +void Window::OnFocusChanged(bool focusIn) +{ + Dali::Window handle(this); + mFocusChangeSignal.Emit(handle, focusIn); + + mSurface->SetFullSwapNextFrame(); + auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge(); + + if(focusIn) + { + bridge->WindowFocused(handle); + } + else + { + bridge->WindowUnfocused(handle); + } + mFocused = focusIn; } void Window::OnOutputTransformed() { - PositionSize positionSize = mSurface->GetPositionSize(); + PositionSize positionSize = GetPositionSize(); - int orientation = (mRotationAngle + mWindowBase->GetScreenRotationAngle()) % 360; - SurfaceRotated(static_cast(positionSize.width), static_cast(positionSize.height), orientation); + SurfaceRotated(static_cast(positionSize.width), static_cast(positionSize.height), mRotationAngle, mWindowBase->GetScreenRotationAngle()); mAdaptor->SurfaceResizePrepare(mSurface.get(), Adaptor::SurfaceSize(positionSize.width, positionSize.height)); mAdaptor->SurfaceResizeComplete(mSurface.get(), Adaptor::SurfaceSize(positionSize.width, positionSize.height)); @@ -845,34 +976,62 @@ void Window::OnWindowRedrawRequest() void Window::OnUpdatePositionSize(Dali::PositionSize& positionSize) { - PositionSize oldRect = mSurface->GetPositionSize(); + bool moved = false; + bool resize = false; - mWindowSurface->UpdatePositionSize(positionSize); + Dali::Window handle(this); + PositionSize oldRect = GetPositionSize(); PositionSize newRect = positionSize; + if((oldRect.x != newRect.x) || (oldRect.y != newRect.y)) + { + moved = true; + } + + if((oldRect.width != newRect.width) || (oldRect.height != newRect.height)) + { + resize = true; + } + + if(moved || resize) + { + DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), current angle (%d), position or size is updated by server , (%d, %d) [%d x %d]\n", this, mNativeWindowId, mRotationAngle, newRect.x, newRect.y, newRect.width, newRect.height); + mWindowSurface->UpdatePositionSize(positionSize); + } + + if((oldRect.x != newRect.x) || (oldRect.y != newRect.y)) + { + DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Moved signal emit (%d, %d)\n", this, mNativeWindowId, newRect.x, newRect.y); + Dali::Window::WindowPosition position(newRect.x, newRect.y); + mMovedSignal.Emit(handle, position); + } + // When surface size is updated, inform adaptor of resizing and emit ResizeSignal if((oldRect.width != newRect.width) || (oldRect.height != newRect.height)) { Uint16Pair newSize(newRect.width, newRect.height); - SurfaceResized(); + mWindowWidth = newRect.width; + mWindowHeight = newRect.height; + + SurfaceResized(static_cast(mWindowWidth), static_cast(mWindowHeight)); mAdaptor->SurfaceResizePrepare(mSurface.get(), newSize); - DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Updated PositionSize by server :resize signal [%d x %d]\n", this, mNativeWindowId, newRect.width, newRect.height); - Dali::Window handle(this); + DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Resized signal emit [%d x %d]\n", this, mNativeWindowId, newRect.width, newRect.height); mResizeSignal.Emit(handle, newSize); mAdaptor->SurfaceResizeComplete(mSurface.get(), newSize); } mSurface->SetFullSwapNextFrame(); - Dali::Accessibility::Accessible::Get(mScene.GetRootLayer(), true)->EmitBoundsChanged(Dali::Rect<>(positionSize.x, positionSize.y, positionSize.width, positionSize.height)); + Dali::Accessibility::Accessible::Get(mScene.GetRootLayer())->EmitBoundsChanged(Dali::Rect<>(positionSize.x, positionSize.y, positionSize.width, positionSize.height)); } void Window::OnTouchPoint(Dali::Integration::Point& point, int timeStamp) { + mLastTouchEvent = Dali::Integration::NewTouchEvent(timeStamp, point); FeedTouchPoint(point, timeStamp); } @@ -883,33 +1042,43 @@ void Window::OnWheelEvent(Dali::Integration::WheelEvent& wheelEvent) void Window::OnKeyEvent(Dali::Integration::KeyEvent& keyEvent) { + mLastKeyEvent = Dali::DevelKeyEvent::New(keyEvent.keyName, keyEvent.logicalKey, keyEvent.keyString, keyEvent.keyCode, keyEvent.keyModifier, keyEvent.time, static_cast(keyEvent.state), keyEvent.compose, keyEvent.deviceName, keyEvent.deviceClass, keyEvent.deviceSubclass); FeedKeyEvent(keyEvent); } void Window::OnRotation(const RotationEvent& rotation) { + PositionSize newPositionSize(rotation.x, rotation.y, rotation.width, rotation.height); + mRotationAngle = rotation.angle; mWindowWidth = rotation.width; mWindowHeight = rotation.height; + mIsWindowRotating = true; + DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), angle(%d), Window Rotation (%d , %d) [%d x %d]\n", this, mNativeWindowId, mRotationAngle, newPositionSize.x, newPositionSize.y, mWindowWidth, mWindowHeight); + // Notify that the orientation is changed mOrientation->OnOrientationChange(rotation); - mWindowSurface->RequestRotation(mRotationAngle, mWindowWidth, mWindowHeight); + mWindowSurface->RequestRotation(mRotationAngle, newPositionSize); - int orientation = (mRotationAngle + mWindowBase->GetScreenRotationAngle()) % 360; - SurfaceRotated(mWindowWidth, mWindowHeight, orientation); + SurfaceRotated(static_cast(mWindowWidth), static_cast(mWindowHeight), mRotationAngle, mWindowBase->GetScreenRotationAngle()); mAdaptor->SurfaceResizePrepare(mSurface.get(), Adaptor::SurfaceSize(mWindowWidth, mWindowHeight)); - DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), OnRotation(): resize signal emit [%d x %d]\n", this, mNativeWindowId, mWindowWidth, mWindowHeight); - // Emit signal Dali::Window handle(this); mResizeSignal.Emit(handle, Dali::Window::WindowSize(mWindowWidth, mWindowHeight)); + mOrientationChangedSignal.Emit(handle, GetCurrentOrientation()); mAdaptor->SurfaceResizeComplete(mSurface.get(), Adaptor::SurfaceSize(mWindowWidth, mWindowHeight)); } +void Window::OnRotationFinished() +{ + mIsWindowRotating = false; + DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), window rotation is finised\n", this, mNativeWindowId); +} + void Window::OnPause() { if(mEventHandler) @@ -937,12 +1106,19 @@ void Window::OnAccessibilityEnabled() { auto bridge = Accessibility::Bridge::GetCurrentBridge(); auto rootLayer = mScene.GetRootLayer(); - auto accessible = Accessibility::Accessible::Get(rootLayer, true); + auto accessible = Accessibility::Accessible::Get(rootLayer); bridge->AddTopLevelWindow(accessible); + if(!mVisible || mIconified) + { + return; + } + + Dali::Window handle(this); + bridge->WindowShown(handle); + if(mFocused) { - Dali::Window handle(this); bridge->WindowFocused(handle); } } @@ -951,13 +1127,12 @@ void Window::OnAccessibilityDisabled() { auto bridge = Accessibility::Bridge::GetCurrentBridge(); auto rootLayer = mScene.GetRootLayer(); - auto accessible = Accessibility::Accessible::Get(rootLayer, true); + auto accessible = Accessibility::Accessible::Get(rootLayer); bridge->RemoveTopLevelWindow(accessible); } -void Window::RecalculateTouchPosition(Integration::Point& point) +Vector2 Window::RecalculatePosition(const Vector2& position) { - Vector2 position = point.GetScreenPosition(); Vector2 convertedPosition; switch(mRotationAngle) @@ -986,8 +1161,7 @@ void Window::RecalculateTouchPosition(Integration::Point& point) break; } } - - point.SetScreenPosition(convertedPosition); + return convertedPosition; } Dali::Window Window::Get(Dali::Actor actor) @@ -1050,7 +1224,6 @@ Dali::Window Window::GetParent() WindowOrientation Window::GetCurrentOrientation() const { - DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), GetCurrentOrientation(): %d\n", this, mNativeWindowId, mRotationAngle); return ConvertToOrientation(mRotationAngle); } @@ -1114,7 +1287,7 @@ void Window::EnableFloatingMode(bool enable) Rect Window::RecalculateRect(const Rect& rect) { Rect newRect; - int screenWidth, screenHeight; + int screenWidth, screenHeight; WindowSystem::GetScreenSize(screenWidth, screenHeight); @@ -1181,6 +1354,21 @@ void Window::SendRotationCompletedAcknowledgement() } } +bool Window::IsWindowRotating() const +{ + return mIsWindowRotating; +} + +const Dali::KeyEvent& Window::GetLastKeyEvent() const +{ + return mLastKeyEvent; +} + +const Dali::TouchEvent& Window::GetLastTouchEvent() const +{ + return mLastTouchEvent; +} + } // namespace Adaptor } // namespace Internal