[Tizen] Add window move/resize completed signal
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / window-devel.h
index 6a64084..9cfaa8f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_WINDOW_DEVEL_H
 
 /*
- * 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.
@@ -22,6 +22,7 @@
 #include <memory>
 
 // INTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/mouse-in-out-event.h>
 #include <dali/public-api/adaptor-framework/window-enumerations.h>
 #include <dali/public-api/adaptor-framework/window.h>
 #include <dali/public-api/common/vector-wrapper.h>
@@ -46,7 +47,11 @@ typedef Signal<void()>
 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
 typedef Signal<bool(const KeyEvent&)>                                                InterceptKeyEventSignalType;             ///< Intercept Key event signal type
-typedef Signal<void(Window, Window::WindowPosition)>                                 MovedSignalType;                         ///< Window Moved signal type
+typedef Signal<void(Window, Dali::Window::WindowPosition)>                           MovedSignalType;                         ///< Window Moved signal type
+typedef Signal<void(Window, Dali::WindowOrientation)>                                OrientationChangedSignalType;            ///< Window orientation changed signal type
+typedef Signal<void(Window, const Dali::DevelWindow::MouseInOutEvent&)>              MouseInOutEventSignalType;               ///< MouseInOutEvent signal type
+typedef Signal<void(Window, Dali::Window::WindowPosition)>                           MoveCompletedSignalType;                 ///< Window Moved by Server signal type
+typedef Signal<void(Window, Dali::Window::WindowSize)>                               ResizeCompletedSignalType;               ///< Window Resized by Server signal type
 
 /**
  * @brief Creates an initialized handle to a new Window.
@@ -57,7 +62,7 @@ typedef Signal<void(Window, Window::WindowPosition)>
  * @param[in] isTransparent Whether Window is transparent
  * @return A new window
  * @note This creates an extra window in addition to the default main window
-*/
+ */
 DALI_ADAPTOR_API Window New(Any surface, PositionSize windowPosition, const std::string& name, bool isTransparent = false);
 
 /**
@@ -218,14 +223,6 @@ DALI_ADAPTOR_API void Unparent(Window window);
 DALI_ADAPTOR_API Window GetParent(Window window);
 
 /**
- * @brief Downcast sceneHolder to window
- *
- * @param[in] handle The handle need to downcast
- * @return The window cast from SceneHolder
- */
-DALI_ADAPTOR_API Window DownCast(BaseHandle handle);
-
-/**
  * @brief Gets current orientation of the window.
  *
  * @param[in] window The window instance
@@ -538,7 +535,7 @@ DALI_ADAPTOR_API InterceptKeyEventSignalType& InterceptKeyEventSignal(Window win
  *
  * A callback of the following type may be connected:
  * @code
- *   void YourCallbackName( Window window, Uint16Pair position );
+ *   void YourCallbackName( Window window, Dali::Window::WindowPosition position );
  * @endcode
  * The parameters are the moved x and y coordinates.
  * and window means this signal was called from what window
@@ -548,6 +545,70 @@ DALI_ADAPTOR_API InterceptKeyEventSignalType& InterceptKeyEventSignal(Window win
  */
 DALI_ADAPTOR_API MovedSignalType& MovedSignal(Window window);
 
+/**
+ * @brief This signal is emitted when the window orientation is changed.
+ *
+ * To emit Window Orientation signal, AddAvailableOrientation() or SetPreferredOrientation() should be called before device is rotated.
+ * Most of cases, AddAvailableOrientation() or SetPreferredOrientation() is callled in onCreate().
+ *
+ * A callback of the following type may be connected:
+ * @code
+ *   void YourCallbackName( Window window, Dali::WindowOrientation orientation );
+ * @endcode
+ * The parameter is the changed window orientation.
+ * and window means this signal was called from what window
+ *
+ * @param[in] window The window instance.
+ * @return The signal to connect to
+ */
+DALI_ADAPTOR_API OrientationChangedSignalType& OrientationChangedSignal(Window window);
+
+/**
+ * @brief This signal is emitted when the mouse in or out event is received.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ *   void YourCallbackName( Window window, Dali::MouseInOutEvent event );
+ * @endcode
+ *
+ * @param[in] window The window instance.
+ * @return The signal to connect to
+ */
+DALI_ADAPTOR_API MouseInOutEventSignalType& MouseInOutEventSignal(Window window);
+
+/**
+ * @brief This signal is emitted when window has been moved by the display server.
+ * To make the window move by display server, RequestMoveToServer() should be called.
+ * After the moving job is completed, this function will be called.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ *   void YourCallbackName( Window window, Dali::Window::WindowPosition position );
+ * @endcode
+ * The parameters are the moved x and y coordinates.
+ * and window means this signal was called from what window
+ *
+ * @param[in] window The window instance.
+ * @return The signal to connect to
+ */
+DALI_ADAPTOR_API MoveCompletedSignalType& MoveCompletedSignal(Window window);
+
+/**
+ * @brief This signal is emitted when window has been resized by the display server.
+ * To make the window move by display server, RequestResizeToServer() should be called.
+ * After the resizing job is completed, this function will be called.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ *   void YourCallbackName( Window window, Dali::Window::WindowPosition position );
+ * @endcode
+ * The parameters are the resized width and height coordinates.
+ * and window means this signal was called from what window
+ *
+ * @param[in] window The window instance.
+ * @return The signal to connect to
+ */
+DALI_ADAPTOR_API ResizeCompletedSignalType& ResizeCompletedSignal(Window window);
 
 } // namespace DevelWindow