[Tizen] Add InsetsChangedSignal to WindowBaseEcoreWl2
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / window-base.h
index 3ff6026..58f3d8e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_BASE_H
 
 /*
- * Copyright (c) 2021 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.
@@ -27,6 +27,7 @@
 #include <vector>
 
 // INTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/mouse-in-out-event.h>
 #include <dali/devel-api/adaptor-framework/window-devel.h>
 #include <dali/internal/graphics/gles/egl-implementation.h>
 #include <dali/internal/window-system/common/damage-observer.h>
@@ -63,17 +64,21 @@ public:
   };
 
   // Window
-  typedef Signal<void(bool)>                                IconifySignalType;
-  typedef Signal<void(bool)>                                FocusSignalType;
-  typedef Signal<void()>                                    OutputSignalType;
-  typedef Signal<void()>                                    DeleteSignalType;
-  typedef Signal<void(const DamageArea&)>                   DamageSignalType;
-  typedef Signal<void(const RotationEvent&)>                RotationSignalType;
-  typedef Signal<void(WindowEffectState, WindowEffectType)> TransitionEffectEventSignalType;
-  typedef Signal<void()>                                    KeyboardRepeatSettingsChangedSignalType;
-  typedef Signal<void()>                                    WindowRedrawRequestSignalType;
-  typedef Signal<void(Dali::PositionSize&)>                 UpdatePositionSizeType;
-  typedef Signal<void(const std::string&, const std::string&, const Property::Array&)>             AuxiliaryMessageSignalType;
+  typedef Signal<void(bool)>                                                           IconifySignalType;
+  typedef Signal<void(bool)>                                                           FocusSignalType;
+  typedef Signal<void()>                                                               OutputSignalType;
+  typedef Signal<void()>                                                               DeleteSignalType;
+  typedef Signal<void(const DamageArea&)>                                              DamageSignalType;
+  typedef Signal<void(const RotationEvent&)>                                           RotationSignalType;
+  typedef Signal<void(WindowEffectState, WindowEffectType)>                            TransitionEffectEventSignalType;
+  typedef Signal<void()>                                                               KeyboardRepeatSettingsChangedSignalType;
+  typedef Signal<void()>                                                               WindowRedrawRequestSignalType;
+  typedef Signal<void(Dali::PositionSize&)>                                            UpdatePositionSizeType;
+  typedef Signal<void(const std::string&, const std::string&, const Property::Array&)> AuxiliaryMessageSignalType;
+  typedef Signal<void(const Dali::DevelWindow::MouseInOutEvent&)>                      MouseInOutEventSignalType;
+  typedef Signal<void(Dali::Int32Pair&)>                                               MoveCompletedSignalType;
+  typedef Signal<void(Dali::Uint16Pair&)>                                              ResizeCompletedSignalType;
+  typedef Signal<void(WindowInsetsPartType, WindowInsetsPartState, const Extents&)>    InsetsChangedSignalType;
 
   // Input events
   typedef Signal<void(Integration::Point&, uint32_t)> TouchEventSignalType;
@@ -84,8 +89,7 @@ public:
   typedef Signal<void(void*)> SelectionSignalType;
 
   // Accessibility
-  typedef Signal<void(StyleChange::Type)>        StyleSignalType;
-  typedef Signal<void(const AccessibilityInfo&)> AccessibilitySignalType;
+  typedef Signal<void(StyleChange::Type)> StyleSignalType;
 
   /**
    * @brief Default constructor
@@ -111,6 +115,12 @@ public:
   virtual int GetNativeWindowId() = 0;
 
   /**
+   * @brief Get the native window resource id assinged by window manager
+   * @return The native window resource id
+   */
+  virtual std::string GetNativeWindowResourceId() = 0;
+
+  /**
    * @brief Create the egl window
    */
   virtual EGLNativeWindowType CreateEglWindow(int width, int height) = 0;
@@ -161,6 +171,11 @@ public:
   virtual void MoveResize(Dali::PositionSize positionSize) = 0;
 
   /**
+   * @copydoc Dali::Window::SetLayout()
+   */
+  virtual void SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan) = 0;
+
+  /**
    * @copydoc Dali::Window::SetClass()
    */
   virtual void SetClass(const std::string& name, const std::string& className) = 0;
@@ -181,6 +196,36 @@ public:
   virtual void Activate() = 0;
 
   /**
+   * @copydoc Dali::DevelWindow::Maximize()
+   */
+  virtual void Maximize(bool maximize) = 0;
+
+  /**
+   * @copydoc Dali::DevelWindow::IsMaximized()
+   */
+  virtual bool IsMaximized() const = 0;
+
+  /**
+   * @copydoc Dali::DevelWindow::SetMaximumSize()
+   */
+  virtual void SetMaximumSize(Dali::Window::WindowSize size) = 0;
+
+  /**
+   * @copydoc Dali::DevelWindow::Minimize()
+   */
+  virtual void Minimize(bool minimize) = 0;
+
+  /**
+   * @copydoc Dali::DevelWindow::IsMinimized()
+   */
+  virtual bool IsMinimized() const = 0;
+
+  /**
+   * @copydoc Dali::DevelWindow::SetMimimumSize()
+   */
+  virtual void SetMimimumSize(Dali::Window::WindowSize size) = 0;
+
+  /**
    * @copydoc Dali::Window::SetAvailableOrientations()
    */
   virtual void SetAvailableAnlges(const std::vector<int>& angles) = 0;
@@ -318,18 +363,19 @@ public:
   virtual void GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical) = 0;
 
   /**
-   * @brief Return the orientation of the surface.
-   * @return The orientation
+   * @brief Return the angle of the window's rotation.
+   * @return The window orientation
    */
-  virtual int GetOrientation() const = 0;
+  virtual int GetWindowRotationAngle() const = 0;
 
   /**
-   * @brief Get the screen rotation angle of the window
+   * @brief Get the angle of screen rotation for the window
+   * @return The screen orientation
    */
   virtual int GetScreenRotationAngle() = 0;
 
   /**
-   * @brief Set the rotation angle of the window
+   * @brief Set the screen rotation angle of the window
    */
   virtual void SetWindowRotationAngle(int degree) = 0;
 
@@ -482,11 +528,6 @@ public:
   StyleSignalType& StyleChangedSignal();
 
   /**
-   * @brief This signal is emitted when an accessibility event is received.
-   */
-  AccessibilitySignalType& AccessibilitySignal();
-
-  /**
    * @brief This signal is emitted when window's transition animation is started or ended.
    */
   TransitionEffectEventSignalType& TransitionEffectEventSignal();
@@ -502,7 +543,8 @@ public:
   WindowRedrawRequestSignalType& WindowRedrawRequestSignal();
 
   /**
-   * @brief This signal is emitted when the window is resized or moved by display server.
+   * @brief This signal is emitted when the window's geometry data is changed by display server or client.
+   * It is based on configure noification event.
    */
   UpdatePositionSizeType& UpdatePositionSizeSignal();
 
@@ -511,6 +553,30 @@ public:
    */
   AuxiliaryMessageSignalType& AuxiliaryMessageSignal();
 
+  /**
+   * @brief This signal is emitted when a mouse in or out event is recevied.
+   */
+  MouseInOutEventSignalType& MouseInOutEventSignal();
+
+  /**
+   * @brief This signal is emitted when window has been moved by then display server.
+   * To be moved the window by display server, RequestMoveToServer() should be called.
+   * After the moving job is finished, this function will be called.
+   */
+  MoveCompletedSignalType& MoveCompletedSignal();
+
+  /**
+   * @brief This signal is emitted when window has been resized by then display server.
+   * To be resized the window by display server, RequestResizeToServer() should be called.
+   * After the resizing job is finished, this function will be called.
+   */
+  ResizeCompletedSignalType& ResizeCompletedSignal();
+
+  /**
+   * @brief This signal is emitted when window insets are changed by appearing or disappearing indicator, virtual keyboard, or clipboard.
+   */
+  InsetsChangedSignalType& InsetsChangedSignal();
+
 protected:
   // Undefined
   WindowBase(const WindowBase&) = delete;
@@ -531,12 +597,15 @@ protected:
   SelectionSignalType                     mSelectionDataSendSignal;
   SelectionSignalType                     mSelectionDataReceivedSignal;
   StyleSignalType                         mStyleChangedSignal;
-  AccessibilitySignalType                 mAccessibilitySignal;
   TransitionEffectEventSignalType         mTransitionEffectEventSignal;
   KeyboardRepeatSettingsChangedSignalType mKeyboardRepeatSettingsChangedSignal;
   WindowRedrawRequestSignalType           mWindowRedrawRequestSignal;
   UpdatePositionSizeType                  mUpdatePositionSizeSignal;
   AuxiliaryMessageSignalType              mAuxiliaryMessageSignal;
+  MouseInOutEventSignalType               mMouseInOutEventSignal;
+  MoveCompletedSignalType                 mMoveCompletedSignal;
+  ResizeCompletedSignalType               mResizeCompletedSignal;
+  InsetsChangedSignalType                 mInsetsChangedSignal;
 };
 
 } // namespace Adaptor