[Tizen] Add to get the status whether window is rotating or not
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / window-devel.h
index 20adb92..459c289 100644 (file)
@@ -32,9 +32,11 @@ class KeyEvent;
 class TouchEvent;
 class WheelEvent;
 class RenderTaskList;
+struct TouchPoint;
 
 namespace DevelWindow
 {
+
 typedef Signal<void()> EventProcessingFinishedSignalType; ///< Event Processing finished signal type
 
 typedef Signal<void(const KeyEvent&)> KeyEventSignalType; ///< Key event signal type
@@ -49,6 +51,10 @@ typedef Signal<void(Window, WindowEffectState, WindowEffectType)> TransitionEffe
 
 typedef Signal<void()> KeyboardRepeatSettingsChangedSignalType; ///< Keyboard repeat settings changed signal type
 
+typedef Signal<void(const std::string&, const std::string&, const Property::Array&)> AuxiliaryMessageSignalType; ///< Auxiliary message signal type
+
+typedef Signal<void(Window, bool)> AccessibilityHighlightSignalType; ///< Accessibility Highlight signal type
+
 /**
  * @brief Creates an initialized handle to a new Window.
  *
@@ -146,6 +152,38 @@ DALI_ADAPTOR_API TransitionEffectEventSignalType& TransitionEffectEventSignal(Wi
 DALI_ADAPTOR_API KeyboardRepeatSettingsChangedSignalType& KeyboardRepeatSettingsChangedSignal(Window window);
 
 /**
+ * @brief This signal is emitted when window's auxiliary was changed then display server sent the message.
+ *
+ * Auxiliary message is sent by display server.
+ * When client application added the window's auxiliary hint and if the auxiliary is changed,
+ * display server send the auxiliary message.
+ * Auxiliary message has the key, value and options.
+ *
+ * @param[in] window The window instance
+ * @return The signal to connect to
+ */
+DALI_ADAPTOR_API AuxiliaryMessageSignalType& AuxiliaryMessageSignal(Window window);
+
+/**
+ * @brief This signal is emitted when the window needs to grab or clear accessibility highlight.
+ * The highlight indicates that it is an object to interact with the user regardless of focus.
+ * After setting the highlight on the object, you can do things that the object can do, such as
+ * giving or losing focus.
+ *
+ * This signal is emitted by Dali::Accessibility::Component::GrabHighlight
+ * and Dali::Accessibility::Component::ClearHighlight
+ *
+ * A callback of the following type may be connected:
+ * @code
+ *   void YourCallbackName( Window window, bool highlight );
+ * @endcode
+ *
+ * @param[in] window The window instance
+ * @return The signal to connect to
+ */
+DALI_ADAPTOR_API AccessibilityHighlightSignalType& AccessibilityHighlightSignal(Window window);
+
+/**
  * @brief Sets parent window of the window.
  *
  * After setting that, these windows do together when raise-up, lower and iconified/deiconified.
@@ -158,6 +196,18 @@ DALI_ADAPTOR_API KeyboardRepeatSettingsChangedSignalType& KeyboardRepeatSettings
 DALI_ADAPTOR_API void SetParent(Window window, Window parent);
 
 /**
+ * @brief Sets parent window of the window.
+ *
+ * After setting that, these windows do together when raise-up, lower and iconified/deiconified.
+ * This function has the additional flag whether the child is located above or below of the parent.
+ *
+ * @param[in] window The window instance
+ * @param[in] parent The parent window instance
+ * @param[in] belowParent The flag is whether the child is located above or below of the parent.
+ */
+DALI_ADAPTOR_API void SetParent(Window window, Window parent, bool belowParent);
+
+/**
  * @brief Unsets parent window of the window.
  *
  * After unsetting, the window is disconnected his parent window.
@@ -308,6 +358,136 @@ DALI_ADAPTOR_API void RequestResizeToServer(Window window, WindowResizeDirection
  */
 DALI_ADAPTOR_API void EnableFloatingMode(Window window, bool enable);
 
+/**
+ * @brief Includes input region.
+ *
+ * This function inlcudes input regions.
+ * It can be used multiple times and supports multiple regions.
+ * It means input region will be extended.
+ *
+ * This input is related to mouse and touch event.
+ * If device has touch screen, this function is useful.
+ * Otherwise device does not have that, we can use it after connecting mouse to the device.
+ *
+ * @param[in] window The window instance.
+ * @param[in] inputRegion The added region to accept input events.
+ */
+DALI_ADAPTOR_API void IncludeInputRegion(Window window, const Rect<int>& inputRegion);
+
+/**
+ * @brief Excludes input region.
+ *
+ * This function excludes input regions.
+ * It can be used multiple times and supports multiple regions.
+ * It means input region will be reduced.
+ * Nofice, should be set input area by IncludeInputRegion() before this function is used.
+ *
+ * This input is related to mouse and touch event.
+ * If device has touch screen, this function is useful.
+ * Otherwise device does not have that, we can use it after connecting mouse to the device.
+ *
+ * @param[in] window The window instance.
+ * @param[in] inputRegion The subtracted region to except input events.
+ */
+DALI_ADAPTOR_API void ExcludeInputRegion(Window window, const Rect<int>& inputRegion);
+
+/**
+ * @brief Sets the necessary for window rotation Acknowledgement.
+ * After this function called, SendRotationCompletedAcknowledgement() should be called to complete window rotation.
+ *
+ * This function is supprot that application has the window rotation acknowledgement's control.
+ * It means display server waits when application's rotation work is finished.
+ * It is useful application has the other rendering engine which works asynchronous.
+ * For instance, GlView.
+ * It only works on Tizen device.
+ *
+ * @param[in] window The window instance.
+ * @param[in] needAcknowledgement the flag is true if window rotation acknowledge is sent.
+ */
+DALI_ADAPTOR_API void SetNeedsRotationCompletedAcknowledgement(Window window, bool needAcknowledgement);
+
+/**
+ * @brief send the Acknowledgement to complete window rotation.
+ * For this function, SetNeedsRotationCompletedAcknowledgement should be already called with true.
+ *
+ * @param[in] window The window instance.
+ */
+DALI_ADAPTOR_API void SendRotationCompletedAcknowledgement(Window window);
+
+/**
+ * @brief Feed (Send) touch event to window
+ * @param[in] window The window instance
+ * @param[in] point The touch point
+ * @param[in] timeStamp The time stamp
+ */
+DALI_ADAPTOR_API void FeedTouchPoint(Window window, const Dali::TouchPoint& point, int32_t timeStamp);
+
+/**
+ * @brief Feed (Send) wheel event to window
+ * @param[in] window The window instance
+ * @param[in] wheelEvent The wheel event
+ */
+DALI_ADAPTOR_API void FeedWheelEvent(Window window, const Dali::WheelEvent& wheelEvent);
+
+/**
+ * @brief Feed (Send) key event to window
+ * @param[in] window The window instance
+ * @param[in] keyEvent The key event holding the key information.
+ */
+DALI_ADAPTOR_API void FeedKeyEvent(Window window, const Dali::KeyEvent& keyEvent);
+
+/**
+ * @brief Maximizes window's size.
+ * If this function is called with true, window will be resized with screen size.
+ * Otherwise window will be resized with previous size.
+ * It is for the window's MAX button in window's border.
+ *
+ * It is for client application.
+ * If window border is supported by display server, it is not necessary.
+ *
+ * @param[in] window The window instance.
+ * @param[in] maximize If window is maximized or unmaximized.
+ */
+DALI_ADAPTOR_API void Maximize(Window window, bool maximize);
+
+/**
+ * @brief Returns whether the window is maximized or not.
+ *
+ * @param[in] window The window instance.
+ * @return True if the window is maximized, false otherwise.
+ */
+DALI_ADAPTOR_API bool IsMaximized(Window window);
+
+/**
+ * @brief Minimizes window's size.
+ * If this function is called with true, window will be iconified.
+ * Otherwise window will be activated.
+ * It is for the window's MIN button in window border.
+ *
+ * It is for client application.
+ * If window border is supported by display server, it is not necessary.
+ *
+ * @param[in] window The window instance.
+ * @param[in] minimize If window is minimized or unminimized(activated).
+ */
+DALI_ADAPTOR_API void Minimize(Window window, bool minimize);
+
+/**
+ * @brief Returns whether the window is minimized or not.
+ *
+ * @param[in] window The window instance.
+ * @return True if the window is minimized, false otherwise.
+ */
+DALI_ADAPTOR_API bool IsMinimized(Window window);
+
+/**
+ * @brief Query whether window is rotating or not.
+ *
+ * @param[in] window The window instance.
+ * @return true if window is rotating, false otherwise.
+ */
+DALI_ADAPTOR_API bool IsWindowRotating(Window window);
+
 } // namespace DevelWindow
 
 } // namespace Dali