Add Window::SetLayout method
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / tizen-wayland / ecore-wl2 / window-base-ecore-wl2.h
index f5fd0ea..00ca5bd 100644 (file)
 #include <wayland-egl.h>
 #include <xkbcommon/xkbcommon.h>
 
-#ifdef DALI_ELDBUS_AVAILABLE
-#include <Eldbus.h>
-#endif
-
 namespace Dali
 {
 namespace Internal
@@ -176,13 +172,6 @@ public:
    */
   void OnEcoreEventWindowAuxiliaryMessage(void* event);
 
-#ifdef DALI_ELDBUS_AVAILABLE
-  /**
-   * @brief Called when Ecore ElDBus accessibility event is received.
-   */
-  void OnEcoreElDBusAccessibilityNotification(void* context, const Eldbus_Message* message);
-#endif
-
   /**
    * @brief Called when a keymap is changed.
    */
@@ -230,6 +219,11 @@ public:
   int GetNativeWindowId() override;
 
   /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeWindowResourceId()
+   */
+  std::string GetNativeWindowResourceId() override;
+
+  /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::CreateEglWindow()
    */
   EGLNativeWindowType CreateEglWindow(int width, int height) override;
@@ -279,6 +273,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()
    */
@@ -300,6 +299,36 @@ public:
   void Activate() override;
 
   /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::Maximize()
+   */
+  void Maximize(bool maximize) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::IsMaximized()
+   */
+  bool IsMaximized() const override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetMaximumSize()
+   */
+  void SetMaximumSize(Dali::Window::WindowSize size) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::Minimize()
+   */
+  void Minimize(bool minimize) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::IsMinimized()
+   */
+  bool IsMinimized() const override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetMimimumSize()
+   */
+  void SetMimimumSize(Dali::Window::WindowSize size) override;
+
+  /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::SetAvailableAnlges()
    */
   void SetAvailableAnlges(const std::vector<int>& angles) override;
@@ -435,9 +464,9 @@ public:
   void GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical) override;
 
   /**
-   * @copydoc Dali::Internal::Adaptor::WindowBase::GetOrientation()
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle()
    */
-  int GetOrientation() const override;
+  int GetWindowRotationAngle() const override;
 
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenRotationAngle()
@@ -526,14 +555,27 @@ private:
   void Initialize(PositionSize positionSize, Any surface, bool isTransparent);
 
   /**
-   * Initialize Ecore ElDBus
+   * @brief Create window
+   */
+  void CreateWindow(PositionSize positionSize);
+
+  /**
+   * @brief Return the window's position and size to recalulate with the default system coordinates.
+   * It is used when window is moved or resized for native ecore wayland window system.
+   *
+   * @param[in] positionSize the window's current position and size with current oriented window's coordinates.
+   * @return the re-calculated window's position and size on the default system coordinates.
    */
-  void InitializeEcoreElDBus();
+  PositionSize RecalculatePositionSizeToSystem(PositionSize positionSize);
 
   /**
-   * @brief Create window
+   * @brief Return the window's position and size to recalulate with current oriented window's coordinates.
+   * It is used when window is moved or resized for dali and uppler layer framework.
+   *
+   * @param[in] positionSize the window's current position and size with the default system coordinates.
+   * @return the re-calculated window's position and size on current oriented window's coordinates.
    */
-  void CreateWindow(PositionSize positionSize);
+  PositionSize RecalculatePositionSizeToCurrentOrientation(PositionSize positionSize);
 
 protected:
   // Undefined
@@ -551,7 +593,7 @@ private:
 #ifdef OVER_TIZEN_VERSION_7
   zwp_input_panel_v1* mWlInputPanel;
 #else
-  wl_input_panel* mWlInputPanel;
+  wl_input_panel*         mWlInputPanel;
 #endif
   wl_output* mWlOutput;
 #ifdef OVER_TIZEN_VERSION_7
@@ -569,8 +611,10 @@ private:
 
   std::vector<std::string> mSupportedAuxiliaryHints;
 
+  // It is based on the default system coordinates.
   Dali::PositionSize mWindowPositionSize;
-  AuxiliaryHints     mAuxiliaryHints;
+
+  AuxiliaryHints mAuxiliaryHints;
 
   WindowType mType;
   int        mNotificationLevel;
@@ -591,10 +635,6 @@ private:
   bool mVisible : 1;
   bool mOwnSurface;
   bool mBrightnessChangeDone;
-
-#ifdef DALI_ELDBUS_AVAILABLE
-  Eldbus_Connection* mSystemConnection;
-#endif // DALI_ELDBUS_AVAILABLE
 };
 
 } // namespace Adaptor