X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fcommon%2Fwindow-impl.h;h=dc5bfc0b5fb98cc841b6f0935313d426b3fc35c3;hb=6af352690fe5cb16092dcf9de16357264288d89c;hp=b364827328374495f045405e9f82c1c962770bf4;hpb=b862a3563681dd37fc724532866e8f93f2800570;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/common/window-impl.h b/dali/internal/window-system/common/window-impl.h index b364827..dc5bfc0 100644 --- a/dali/internal/window-system/common/window-impl.h +++ b/dali/internal/window-system/common/window-impl.h @@ -64,6 +64,7 @@ public: typedef Dali::DevelWindow::VisibilityChangedSignalType VisibilityChangedSignalType; typedef Dali::DevelWindow::TransitionEffectEventSignalType TransitionEffectEventSignalType; typedef Dali::DevelWindow::KeyboardRepeatSettingsChangedSignalType KeyboardRepeatSettingsChangedSignalType; + typedef Dali::DevelWindow::AuxiliaryMessageSignalType AuxiliaryMessageSignalType; typedef Signal SignalType; /** @@ -71,10 +72,11 @@ public: * @param[in] positionSize The position and size of the window * @param[in] name The window title * @param[in] className The window class name + * @param[in] type Window type. * @param[in] isTransparent Whether window is transparent * @return A newly allocated Window */ - static Window* New(const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent = false); + static Window* New(const PositionSize& positionSize, const std::string& name, const std::string& className, Dali::WindowType type, bool isTransparent = false); /** * @brief Create a new Window. This should only be called once by the Application class @@ -82,10 +84,11 @@ public: * @param[in] positionSize The position and size of the window * @param[in] name The window title * @param[in] className The window class name + * @param[in] type Window type. * @param[in] isTransparent Whether window is transparent * @return A newly allocated Window */ - static Window* New(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent = false); + static Window* New(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, Dali::WindowType type, bool isTransparent = false); /** * @copydoc Dali::Window::SetClass() @@ -221,7 +224,7 @@ public: /** * @copydoc Dali::Window::SetNotificationLevel() */ - bool SetNotificationLevel(WindowNotificationLevel level); + WindowOperationResult SetNotificationLevel(WindowNotificationLevel level); /** * @copydoc Dali::Window::GetNotificationLevel() @@ -241,7 +244,7 @@ public: /** * @copydoc Dali::Window::SetScreenOffMode() */ - bool SetScreenOffMode(WindowScreenOffMode screenOffMode); + WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode); /** * @copydoc Dali::Window::GetScreenOffMode() @@ -251,7 +254,7 @@ public: /** * @copydoc Dali::Window::SetBrightness() */ - bool SetBrightness(int brightness); + WindowOperationResult SetBrightness(int brightness); /** * @copydoc Dali::Window::GetBrightness() @@ -284,6 +287,11 @@ public: void SetPositionSize(PositionSize positionSize); /** + * @copydoc Dali::DevelWindow::GetPositionSize() + */ + PositionSize GetPositionSize() const; + + /** * @copydoc Dali::Window::GetRootLayer() */ Dali::Layer GetRootLayer() const; @@ -319,11 +327,16 @@ public: static Dali::Window Get(Dali::Actor actor); /** - * @copydoc Dali::DevelWindow::SetParent() + * @copydoc Dali::DevelWindow::SetParent(Window window, Window parent) */ void SetParent(Dali::Window& parent); /** + * @copydoc Dali::DevelWindow::SetParent(Window window, Window parent, bool belowParent) + */ + void SetParent(Dali::Window& parent, bool belowParent); + + /** * @copydoc Dali::DevelWindow::Unparent() */ void Unparent(); @@ -339,10 +352,20 @@ public: WindowOrientation GetCurrentOrientation() const; /** + * @copydoc Dali::DevelWindow::GetPhysicalOrientation() + */ + int GetPhysicalOrientation() const; + + /** * @copydoc Dali::DevelWindow::SetAvailableOrientations() */ void SetAvailableOrientations(const Dali::Vector& orientations); + /** + * @copydoc Dali::DevelWindow::SetPositionSizeWithOrientation() + */ + void SetPositionSizeWithOrientation(PositionSize positionSize, WindowOrientation orientation); + public: // Dali::Internal::Adaptor::SceneHolder /** * @copydoc Dali::Internal::Adaptor::SceneHolder::GetNativeHandle @@ -359,6 +382,41 @@ public: // Dali::Internal::Adaptor::SceneHolder */ int32_t GetNativeId() const; + /** + * @copydoc Dali::DevelWindow::RequestMoveToServer() + */ + void RequestMoveToServer(); + + /** + * @copydoc Dali::DevelWindow::RequestResizeToServer() + */ + void RequestResizeToServer(WindowResizeDirection direction); + + /** + * @copydoc Dali::DevelWindow::EnableFloatingMode() + */ + void EnableFloatingMode(bool enable); + + /** + * @copydoc Dali::DevelWindow::IncludeInputRegion() + */ + void IncludeInputRegion(const Rect& inputRegion); + + /** + * @copydoc Dali::DevelWindow::ExcludeInputRegion() + */ + void ExcludeInputRegion(const Rect& inputRegion); + + /** + * @copydoc Dali::DevelWindow::SetNeedsRotationCompletedAcknowledgement() + */ + void SetNeedsRotationCompletedAcknowledgement(bool needAcknowledgement); + + /** + * @copydoc Dali::DevelWindow::SendRotationCompletedAcknowledgement() + */ + void SendRotationCompletedAcknowledgement(); + private: /** * @brief Enumeration for orietation mode. @@ -386,7 +444,7 @@ private: /** * Second stage initialization */ - void Initialize(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className); + void Initialize(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, WindowType type); /** * Called when the window becomes iconified or deiconified. @@ -424,6 +482,36 @@ private: void OnWindowRedrawRequest(); /** + * @brief Called when the window is resized or moved by display server. + * + * @param[in] positionSize the updated window's position and size. + */ + void OnUpdatePositionSize(Dali::PositionSize& positionSize); + + /** + * @brief Called when display server sent the auxiliary message. + * + * @param[in] key the auxiliary message's key. + * @param[in] value the auxiliary message's value. + * @param[in] options the auxiliary message's options. This is the list of string. + */ + void OnAuxiliaryMessage(const std::string& key, const std::string& value, const Property::Array& options); + + /** + * @brief Called when Accessibility is enabled. + * + * This method is to register the window to accessibility bridge. + */ + void OnAccessibilityEnabled(); + + /** + * @brief Called when Accessibility is disabled. + * + * This method is to remove the window from accessibility bridge. + */ + void OnAccessibilityDisabled(); + + /** * @brief Set available orientation to window base. */ void SetAvailableAnlges(const std::vector& angles); @@ -443,6 +531,20 @@ private: */ bool IsOrientationAvailable(WindowOrientation orientation) const; + /** + * @brief Return the rect value to recalulate with the default system coordinates. + * + * Some native window APIs work the geometry value based on the default system coordinates. + * IncludeInputRegion() and ExcludeInputRegion() are one of them. + * When the window is rotated, current window's geometry already were set with the rotated angle. + * If IncludeInputRegion() or ExcludeInputRegion() are called with rotated angle by application, + * the rect's area should be re-calcuated on the default system coordinates. + * + * @param[in] rect the window's current position and size with current window rotation angle. + * @return the re-calculated rect on the default system coordinates. + */ + Rect RecalculateRect(const Rect& rect); + private: // Dali::Internal::Adaptor::SceneHolder /** * @copydoc Dali::Internal::Adaptor::SceneHolder::OnAdaptorSet @@ -547,6 +649,14 @@ public: // Signals return mKeyboardRepeatSettingsChangedSignal; } + /** + * @copydoc Dali::DevelWindow::AuxiliaryMessageSignal() + */ + AuxiliaryMessageSignalType& AuxiliaryMessageSignal() + { + return mAuxiliaryMessageSignal; + } + private: WindowRenderSurface* mWindowSurface; ///< The window rendering surface WindowBase* mWindowBase; @@ -556,23 +666,22 @@ private: bool mIsFocusAcceptable : 1; bool mIconified : 1; bool mOpaqueState : 1; - bool mResizeEnabled : 1; - WindowType mType; + bool mWindowRotationAcknowledgement : 1; Dali::Window mParentWindow; OrientationPtr mOrientation; std::vector mAvailableAngles; int mPreferredAngle; - int mRotationAngle; ///< The angle of the rotation - int mWindowWidth; ///< The width of the window - int mWindowHeight; ///< The height of the window + int mRotationAngle; ///< The angle of the rotation + int mWindowWidth; ///< The width of the window + int mWindowHeight; ///< The height of the window - EventHandlerPtr mEventHandler; ///< The window events handler + EventHandlerPtr mEventHandler; ///< The window events handler - OrientationMode mOrientationMode; + OrientationMode mOrientationMode; ///< The physical screen mode is portrait or landscape - int mNativeWindowId; ///< The Native Window Id + int mNativeWindowId; ///< The Native Window Id // Signals SignalType mDeleteRequestSignal; @@ -581,6 +690,7 @@ private: VisibilityChangedSignalType mVisibilityChangedSignal; TransitionEffectEventSignalType mTransitionEffectEventSignal; KeyboardRepeatSettingsChangedSignalType mKeyboardRepeatSettingsChangedSignal; + AuxiliaryMessageSignalType mAuxiliaryMessageSignal; }; } // namespace Adaptor