Add front buffer rendering APIs in Dali::Window
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / window-devel.h
index 0096167..2a92b07 100644 (file)
@@ -22,8 +22,9 @@
 #include <memory>
 
 // INTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/device-info-event.h>
 #include <dali/devel-api/adaptor-framework/mouse-in-out-event.h>
+#include <dali/devel-api/adaptor-framework/mouse-relative-event.h>
+#include <dali/devel-api/adaptor-framework/pointer-constraints-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>
@@ -32,6 +33,7 @@ namespace Dali
 {
 class KeyEvent;
 class TouchEvent;
+class HoverEvent;
 class WheelEvent;
 class RenderTaskList;
 struct TouchPoint;
@@ -51,9 +53,11 @@ typedef Signal<bool(const KeyEvent&)>
 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, const Dali::DevelWindow::MouseRelativeEvent&)>           MouseRelativeEventSignalType;            ///< MouseRelativeEvent 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
-typedef Signal<void(Window, const Dali::DevelWindow::DeviceInfoEvent&)>              DeviceInfoEventSignalType;               ///< DeviceInfoEvent signal type
+typedef Signal<void(WindowInsetsPartType, WindowInsetsPartState, const Extents&)>    InsetsChangedSignalType;                 ///< InsetsChanged signal type
+typedef Signal<void(Window, const Dali::DevelWindow::PointerConstraintsEvent&)>      PointerConstraintsSignalType;            ///< PointerConstraintsEvent signal type
 
 /**
  * @brief Creates an initialized handle to a new Window.
@@ -351,6 +355,14 @@ DALI_ADAPTOR_API void RequestResizeToServer(Window window, WindowResizeDirection
 DALI_ADAPTOR_API void EnableFloatingMode(Window window, bool enable);
 
 /**
+ * @brief Returns whether the window is floating mode or not.
+ *
+ * @param[in] window The window instance.
+ * @return True if the window is enabled floating mode, false otherwise.
+ */
+DALI_ADAPTOR_API bool IsFloatingModeEnabled(Window window);
+
+/**
  * @brief Includes input region.
  *
  * This function inlcudes input regions.
@@ -429,6 +441,13 @@ DALI_ADAPTOR_API void FeedWheelEvent(Window window, const Dali::WheelEvent& whee
 DALI_ADAPTOR_API void FeedKeyEvent(Window window, const Dali::KeyEvent& keyEvent);
 
 /**
+ * @brief Feed (Send) hover event to window
+ * @param[in] window The window instance
+ * @param[in] point The touch point that create a hover event
+ */
+DALI_ADAPTOR_API void FeedHoverEvent(Window window, const Dali::TouchPoint& point);
+
+/**
  * @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.
@@ -522,6 +541,121 @@ DALI_ADAPTOR_API const KeyEvent& GetLastKeyEvent(Window window);
 DALI_ADAPTOR_API const TouchEvent& GetLastTouchEvent(Window window);
 
 /**
+ * @brief Gets the last hover event the window gets.
+ *
+ * @param[in] window The window instance.
+ * @return The last hover event the window gets.
+ * @note It returns the raw event the window gets. There is no hit-actor and local position information.
+ */
+DALI_ADAPTOR_API const HoverEvent& GetLastHoverEvent(Window window);
+
+/**
+ * @brief Sets the pointer constraints lock.
+ *
+ * @param[in] window The window instance.
+ * @return Returns true if PointerConstraintsLock succeeds.
+ */
+DALI_ADAPTOR_API bool PointerConstraintsLock(Window window);
+
+/**
+ * @brief Sets the pointer constraints unlock.
+ *
+ * @param[in] window The window instance.
+ * @return Returns true if PointerConstraintsUnlock succeeds.
+ */
+DALI_ADAPTOR_API bool PointerConstraintsUnlock(Window window);
+
+/**
+ * @brief Sets the locked pointer region
+ *
+ * @param[in] window The window instance.
+ * @param[in] x The x position.
+ * @param[in] y The y position.
+ * @param[in] width The width.
+ * @param[in] height The height
+ */
+DALI_ADAPTOR_API void LockedPointerRegionSet(Window window, int32_t x, int32_t y, int32_t width, int32_t height);
+
+/**
+ * @brief Sets the locked pointer cursor position hintset
+ *
+ * @param[in] window The window instance.
+ * @param[in] x The x position.
+ * @param[in] y The y position.
+ */
+DALI_ADAPTOR_API void LockedPointerCursorPositionHintSet(Window window, int32_t x, int32_t y);
+
+/**
+ * @brief Sets the pointer warp. The pointer moves to the set coordinates.
+ *
+ * @param[in] window The window instance.
+ * @param[in] x The x position.
+ * @param[in] y The y position.
+ * @return Returns true if PointerWarp succeeds.
+ */
+DALI_ADAPTOR_API bool PointerWarp(Window window, int32_t x, int32_t y);
+
+/**
+ * @brief Sets visibility on/off of cursor
+ *
+ * @param[in] window The window instance.
+ * @param[in] visible The visibility of cursor
+ */
+DALI_ADAPTOR_API void CursorVisibleSet(Window window, bool visible);
+
+/**
+ * @brief Requests grab key events according to the requested device subtype
+ *
+ * @param[in] window The window instance.
+ * @param[in] deviceSubclass The deviceSubclass type.
+ * @return Returns true if KeyboardGrab succeeds.
+ */
+DALI_ADAPTOR_API bool KeyboardGrab(Window window, Device::Subclass::Type deviceSubclass);
+
+/**
+ * @brief Requests ungrab key events
+ *
+ * @param[in] window The window instance.
+ * @return Returns true if KeyboardUnGrab succeeds.
+ */
+DALI_ADAPTOR_API bool KeyboardUnGrab(Window window);
+
+/**
+ * @brief Sets full screen sized window.
+ * If full screen size is set for the window,
+ * window will be resized with full screen size.
+ * In addition, the full screen sized window's z-order is the highest.
+ *
+ * @param[in] window The window instance.
+ * @param[in] fullscreen true to set fullscreen, false to unset.
+ */
+DALI_ADAPTOR_API void SetFullScreen(Window window, bool fullscreen);
+
+/**
+ * @brief Gets whether the full screen sized window or not
+ *
+ * @param[in] window The window instance.
+ * @return Returns true if the full screen sized window is.
+ */
+DALI_ADAPTOR_API bool GetFullScreen(Window window);
+
+/**
+ * @brief Enables or disables front buffer rendering.
+ *
+ * @param[in] window The window instance.
+ * @param[in] enable true to enable front buffer rendering, false to disable.
+ */
+DALI_ADAPTOR_API void SetFrontBufferRendering(Window window, bool enable);
+
+/**
+ * @brief Gets whether front buffer rendering is enabled.
+ *
+ * @param[in] window The window instance.
+ * @return Whether front buffer rendering has been enabled or not.
+ */
+DALI_ADAPTOR_API bool GetFrontBufferRendering(Window window);
+
+/**
  * @brief The user would connect to this signal to intercept a KeyEvent at window.
  *
  * Intercepts KeyEvents in the window before dispatching KeyEvents to the control.
@@ -579,6 +713,19 @@ DALI_ADAPTOR_API OrientationChangedSignalType& OrientationChangedSignal(Window w
 DALI_ADAPTOR_API MouseInOutEventSignalType& MouseInOutEventSignal(Window window);
 
 /**
+ * @brief This signal is emitted when the mouse relative event is received.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ *   void YourCallbackName( Window window, Dali::MouseRelativeEvent event );
+ * @endcode
+ *
+ * @param[in] window The window instance.
+ * @return The signal to connect to
+ */
+DALI_ADAPTOR_API MouseRelativeEventSignalType& MouseRelativeEventSignal(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.
@@ -613,17 +760,20 @@ DALI_ADAPTOR_API MoveCompletedSignalType& MoveCompletedSignal(Window window);
 DALI_ADAPTOR_API ResizeCompletedSignalType& ResizeCompletedSignal(Window window);
 
 /**
- * @brief This signal is emitted when the device info event is received.
+ * @brief This signal is emitted when window insets are changed by appearing or disappearing indicator, virtual keyboard, or clipboard.
  *
- * A callback of the following type may be connected:
- * @code
- *   void YourCallbackName( Window window, Dali::DeviceInfoEvent event );
- * @endcode
+ * @param[in] window The window instance
+ * @return The signal to connect to
+ */
+DALI_ADAPTOR_API InsetsChangedSignalType& InsetsChangedSignal(Window window);
+
+/**
+ * @brief This signal is emitted when pointer is locked/unlocked
  *
- * @param[in] window The window instance.
+ * @param[in] window The window instance
  * @return The signal to connect to
  */
-DALI_ADAPTOR_API DeviceInfoEventSignalType& DeviceInfoEventSignal(Window window);
+DALI_ADAPTOR_API PointerConstraintsSignalType& PointerConstraintsSignal(Window window);
 
 } // namespace DevelWindow