Add window move/resize completed signal
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / tizen-wayland / ecore-wl2 / window-base-ecore-wl2.h
index 6b66478..af8054f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_WINDOW_BASE_ECORE_WL2_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.
@@ -116,6 +116,11 @@ public:
   void OnMouseWheel(void* data, int type, void* event);
 
   /**
+   * @brief Called when a mouse in or out is received.
+   */
+  void OnMouseInOut(void* data, int type, void* event, Dali::DevelWindow::MouseInOutEvent::Type action);
+
+  /**
    * @brief Called when a detent rotation event is recevied.
    */
   void OnDetentRotation(void* data, int type, void* event);
@@ -173,6 +178,24 @@ public:
   void OnEcoreEventWindowAuxiliaryMessage(void* event);
 
   /**
+   * @brief Called when window has been moved by then display server.
+   * To move the window by display server, RequestMoveToServer() should be called.
+   * After the moving job is completed, this function will be called.
+   *
+   * @param[in] the completed event's data. It has the latest window geometry data.
+   */
+  void OnMoveCompleted(void* event);
+
+  /**
+   * @brief Called when window has been resized by then display server.
+   * To resize the window by display server, RequestResizeToServer() should be called.
+   * After the resizing job is completed, this function will be called.
+   *
+   * @param[in] the completed event's data. It has the latest window geometry data.
+   */
+  void OnResizeCompleted(void* event);
+
+  /**
    * @brief Called when a keymap is changed.
    */
   void KeymapChanged(void* data, int type, void* event);
@@ -274,6 +297,11 @@ public:
   void MoveResize(PositionSize positionSize) override;
 
   /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetLayout()
+   */
+  void SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan) override;
+
+  /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::SetClass()
    */
   void SetClass(const std::string& name, const std::string& className) override;
@@ -572,6 +600,20 @@ private:
    */
   PositionSize RecalculatePositionSizeToCurrentOrientation(PositionSize positionSize);
 
+  /**
+   * @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> RecalculateInputRect(const Rect<int>& rect);
+
 protected:
   // Undefined
   WindowBaseEcoreWl2(const WindowBaseEcoreWl2&) = delete;
@@ -618,8 +660,6 @@ private:
   int        mWindowRotationAngle;
   int        mScreenRotationAngle;
   int        mSupportedPreProtation;
-  int        mScreenWidth;
-  int        mScreenHeight;
 
   uint32_t          mNotificationChangeState;
   uint32_t          mScreenOffModeChangeState;