Fix the calculating logic for input region
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / window-impl.h
index eb3aac6..bb49a8d 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_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.
@@ -68,6 +68,7 @@ public:
   typedef Dali::DevelWindow::AuxiliaryMessageSignalType              AuxiliaryMessageSignalType;
   typedef Dali::DevelWindow::AccessibilityHighlightSignalType        AccessibilityHighlightSignalType;
   typedef Dali::DevelWindow::MovedSignalType                         MovedSignalType;
+  typedef Dali::DevelWindow::OrientationChangedSignalType            OrientationChangedSignalType;
   typedef Signal<void()>                                             SignalType;
 
   /**
@@ -331,6 +332,11 @@ public:
   PositionSize GetPositionSize() const;
 
   /**
+   * @copydoc Dali::Window::SetLayout()
+   */
+  void SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan);
+
+  /**
    * @copydoc Dali::Window::GetRootLayer()
    */
   Dali::Layer GetRootLayer() const;
@@ -415,6 +421,13 @@ public:
    */
   void EmitAccessibilityHighlightSignal(bool highlight);
 
+  /**
+   * @brief Sets the render notification trigger to call when render thread is completed a frame
+   *
+   * @param[in] renderNotification to use
+   */
+  void SetRenderNotification(TriggerEventInterface *renderNotification);
+
 public: // Dali::Internal::Adaptor::SceneHolder
   /**
    * @copydoc Dali::Internal::Adaptor::SceneHolder::GetNativeHandle
@@ -516,6 +529,11 @@ private:
   void OnIconifyChanged(bool iconified);
 
   /**
+   * Called when the window becomes maximized or unmaximized.
+   */
+  void OnMaximizeChanged(bool maximized);
+
+  /**
    * Called when the window focus is changed.
    */
   void OnFocusChanged(bool focusIn);
@@ -602,20 +620,6 @@ private:
    */
   bool IsOrientationAvailable(WindowOrientation orientation) const;
 
-  /**
-   * @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> RecalculateRect(const Rect<int>& rect);
-
 private: // Dali::Internal::Adaptor::SceneHolder
   /**
    * @copydoc Dali::Internal::Adaptor::SceneHolder::OnAdaptorSet
@@ -638,9 +642,9 @@ private: // Dali::Internal::Adaptor::SceneHolder
   void OnResume() override;
 
   /**
-   * @copydoc Dali::Internal::Adaptor::SceneHolder::RecalculateTouchPosition
+   * @copydoc Dali::Internal::Adaptor::SceneHolder::RecalculatePosition
    */
-  void RecalculateTouchPosition(Integration::Point& point) override;
+  Vector2 RecalculatePosition(const Vector2& position) override;
 
 private: // Dali::Internal::Adaptor::EventHandler::Observer
   /**
@@ -744,6 +748,14 @@ public: // Signals
     return mMovedSignal;
   }
 
+  /**
+   * @copydoc Dali::DevelWindow::OrientationChangedSignal()
+   */
+  OrientationChangedSignalType& OrientationChangedSignal()
+  {
+    return mOrientationChangedSignal;
+  }
+
 private:
   WindowRenderSurface* mWindowSurface; ///< The window rendering surface
   WindowBase*          mWindowBase;
@@ -773,6 +785,7 @@ private:
   AuxiliaryMessageSignalType              mAuxiliaryMessageSignal;
   AccessibilityHighlightSignalType        mAccessibilityHighlightSignal;
   MovedSignalType                         mMovedSignal;
+  OrientationChangedSignalType            mOrientationChangedSignal;
 
   Dali::KeyEvent   mLastKeyEvent;
   Dali::TouchEvent mLastTouchEvent;
@@ -780,6 +793,7 @@ private:
   bool mIsTransparent : 1;
   bool mIsFocusAcceptable : 1;
   bool mIconified : 1;
+  bool mMaximized : 1;
   bool mOpaqueState : 1;
   bool mWindowRotationAcknowledgement : 1;
   bool mFocused : 1;