Add auxiliary message for window
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / window-devel.h
index 6d3d0bd..199dea2 100644 (file)
@@ -35,6 +35,7 @@ class RenderTaskList;
 
 namespace DevelWindow
 {
+
 typedef Signal<void()> EventProcessingFinishedSignalType; ///< Event Processing finished signal type
 
 typedef Signal<void(const KeyEvent&)> KeyEventSignalType; ///< Key event signal type
@@ -49,6 +50,8 @@ 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
+
 /**
  * @brief Creates an initialized handle to a new Window.
  *
@@ -146,6 +149,19 @@ 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 Sets parent window of the window.
  *
  * After setting that, these windows do together when raise-up, lower and iconified/deiconified.
@@ -158,6 +174,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.
@@ -255,21 +283,115 @@ DALI_ADAPTOR_API void AddFrameRenderedCallback(Window window, std::unique_ptr<Ca
  */
 DALI_ADAPTOR_API void AddFramePresentedCallback(Window window, std::unique_ptr<CallbackBase> callback, int32_t frameId);
 
-  /**
  * @brief Sets window position and size for specific orientation.
  * This api reserves the position and size per orientation to display server.
  * When the device is rotated, the window is moved/resized with the reserved position/size by display server.
  *
  * @param[in] window The window instance
  * @param[in] positionSize The reserved position and size for the orientation
  * @param[in] orientation The orientation
  *
  * @note Currently, it only works when the window's type is WindowType::IME.
  * @note To set WindowType::IME, use Application New(... WindowType type), not Window::SetType().
  * @note This function is only useful in Tizen world.
  */
+/**
+ * @brief Sets window position and size for specific orientation.
+ * This api reserves the position and size per orientation to display server.
+ * When the device is rotated, the window is moved/resized with the reserved position/size by display server.
+ *
+ * @param[in] window The window instance
+ * @param[in] positionSize The reserved position and size for the orientation
+ * @param[in] orientation The orientation
+ *
+ * @note Currently, it only works when the window's type is WindowType::IME.
+ * @note To set WindowType::IME, use Application New(... WindowType type), not Window::SetType().
+ * @note This function is only useful in Tizen world.
+ */
 DALI_ADAPTOR_API void SetPositionSizeWithOrientation(Window window, PositionSize positionSize, WindowOrientation orientation);
 
+/**
+ * @brief Requests to display server for the window is moved by display server.
+ *
+ * This function should be called in mouse down event callback function.
+ * After this function is called in mouse down event callback function, the window is moved with mouse move event.
+ * When mouse up event happens, the window moved work is finished.
+ *
+ * @param[in] window The window instance
+ */
+DALI_ADAPTOR_API void RequestMoveToServer(Window window);
+
+/**
+ * @brief Requests to display server for the window is resized by display server.
+ *
+ * This function should be called in mouse down event callback function.
+ * After this function is called in mouse down event callback function, the window is resized with mouse move event.
+ * The direction is selected one of eight ways.
+ * When mouse up event happens, the window resized work is finished.
+ *
+ * @param[in] window The window instance
+ * @param[in] direction it is indicated the window's side or edge for starting point.
+ */
+DALI_ADAPTOR_API void RequestResizeToServer(Window window, WindowResizeDirection direction);
+
+/**
+ * @brief Enables the floating mode of window.
+ *
+ * The floating mode is to support making partial size window easliy.
+ * It is useful to make popup style window and this window is always upper than the other normal window.
+ * In addition, it is easy to change between popup style and normal style window.
+ *
+ * A special display server(as a Tizen display server) supports this mode.
+ *
+ * @param[in] window The window instance.
+ * @param[in] enable Enable floating mode or not.
+ */
+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);
+
 } // namespace DevelWindow
 
 } // namespace Dali