* @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
* @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()
/**
* @copydoc Dali::Window::SetNotificationLevel()
*/
- bool SetNotificationLevel(WindowNotificationLevel level);
+ WindowOperationResult SetNotificationLevel(WindowNotificationLevel level);
/**
* @copydoc Dali::Window::GetNotificationLevel()
/**
* @copydoc Dali::Window::SetScreenOffMode()
*/
- bool SetScreenOffMode(WindowScreenOffMode screenOffMode);
+ WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode);
/**
* @copydoc Dali::Window::GetScreenOffMode()
/**
* @copydoc Dali::Window::SetBrightness()
*/
- bool SetBrightness(int brightness);
+ WindowOperationResult SetBrightness(int brightness);
/**
* @copydoc Dali::Window::GetBrightness()
void SetPositionSize(PositionSize positionSize);
/**
+ * @copydoc Dali::DevelWindow::GetPositionSize()
+ */
+ PositionSize GetPositionSize() const;
+
+ /**
* @copydoc Dali::Window::GetRootLayer()
*/
Dali::Layer GetRootLayer() const;
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();
*/
void SetAvailableOrientations(const Dali::Vector<WindowOrientation>& orientations);
+ /**
+ * @copydoc Dali::DevelWindow::SetPositionSizeWithOrientation()
+ */
+ void SetPositionSizeWithOrientation(PositionSize positionSize, WindowOrientation orientation);
+
public: // Dali::Internal::Adaptor::SceneHolder
/**
* @copydoc Dali::Internal::Adaptor::SceneHolder::GetNativeHandle
*/
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<int>& inputRegion);
+
+ /**
+ * @copydoc Dali::DevelWindow::ExcludeInputRegion()
+ */
+ void ExcludeInputRegion(const Rect<int>& inputRegion);
+
+ /**
+ * @copydoc Dali::DevelWindow::SetNeedsRotationCompletedAcknowledgement()
+ */
+ void SetNeedsRotationCompletedAcknowledgement(bool needAcknowledgement);
+
+ /**
+ * @copydoc Dali::DevelWindow::SendRotationCompletedAcknowledgement()
+ */
+ void SendRotationCompletedAcknowledgement();
+
private:
/**
* @brief Enumeration for orietation mode.
/**
* 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.
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 Set available orientation to window base.
*/
void SetAvailableAnlges(const std::vector<int>& angles);
*/
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<int> RecalculateRect(const Rect<int>& rect);
+
private: // Dali::Internal::Adaptor::SceneHolder
/**
* @copydoc Dali::Internal::Adaptor::SceneHolder::OnAdaptorSet
bool mIsFocusAcceptable : 1;
bool mIconified : 1;
bool mOpaqueState : 1;
- bool mResizeEnabled : 1;
- WindowType mType;
+ bool mWindowRotationAcknowledgement : 1;
Dali::Window mParentWindow;
OrientationPtr mOrientation;
std::vector<int> 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;