[Tizen] Add to get the status whether window is rotating or not
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / window-render-surface.h
index 2661adc..5e58893 100644 (file)
@@ -97,10 +97,9 @@ public: // API
   /**
    * Request surface rotation
    * @param[in] angle A new angle of the surface
-   * @param[in] width A new width of the surface
-   * @param[in] height A new height of the surface
+   * @param[in] positionSize A new position and size of the surface
    */
-  void RequestRotation(int angle, int width, int height);
+  void RequestRotation(int angle, PositionSize positionSize);
 
   /**
    * @brief Gets the window base object
@@ -109,6 +108,43 @@ public: // API
   WindowBase* GetWindowBase();
 
   /**
+   * @brief Intiailize Ime Surface for Ime window rendering.
+   *
+   * It sets one flag and callback function for Ime window rendering
+   * This callback function calls one special native window function for ready to commit buffer.
+   * The special function notify to display server.
+   * It is only used for Ime window.
+   */
+  void InitializeImeSurface();
+
+  /**
+   * @brief Sets the necessary for window rotation acknowledge.
+   * After this function called, SendRotationCompletedAcknowledgement() should be called to complete window rotation.
+   *
+   * More detail description is written in DevelWindow::SetNeedsRotationCompletedAcknowledgement().
+   *
+   * @param[in] window The window instance.
+   * @param[in] needAcknowledgement the flag is true if window rotation acknowledgement is sent.
+   */
+  void SetNeedsRotationCompletedAcknowledgement(bool needAcknowledgement);
+
+  /**
+   * @brief Updates window surface's position and size.
+   * It is just to update the local variable in window surface.
+   * This function is only called when window's position or size is changed by display server.
+   *
+   * @param[in] positionSize The updated window surface's position and size.
+   */
+  void UpdatePositionSize(Dali::PositionSize positionSize);
+
+  /**
+   * @brief Query whether window is rotating or not.
+   *
+   * @return true if window is rotating, false otherwise.
+   */
+  bool IsWindowRotating() const;
+
+  /**
    * @brief This signal is emitted when the output is transformed.
    */
   OutputSignalType& OutputTransformedSignal();
@@ -215,9 +251,10 @@ private:
   void OutputTransformed();
 
   /**
-   * @brief Used as the callback for the rotation-trigger.
+   * @brief Used as the callback for the post render.
+   * It is used both window rotation and supporting Ime window
    */
-  void ProcessRotationRequest();
+  void ProcessPostRender();
 
   /**
    * @brief Used as the callback for the frame rendered / presented.
@@ -287,7 +324,7 @@ private: // Data
   std::unique_ptr<WindowBase>            mWindowBase;
   ThreadSynchronizationInterface*        mThreadSynchronization;
   TriggerEventInterface*                 mRenderNotification; ///< Render notification trigger
-  TriggerEventInterface*                 mRotationTrigger;
+  std::unique_ptr<TriggerEventInterface> mPostRenderTrigger;  ///< Post render callback function
   std::unique_ptr<TriggerEventInterface> mFrameRenderedTrigger;
   GraphicsInterface*                     mGraphics; ///< Graphics interface
   EGLSurface                             mEGLSurface;
@@ -307,6 +344,8 @@ private: // Data
   bool                                   mScreenRotationFinished;
   bool                                   mResizeFinished;
   bool                                   mDefaultScreenRotationAvailable;
+  bool                                   mIsImeWindowSurface;
+  bool                                   mNeedWindowRotationAcknowledgement;
 
 }; // class WindowRenderSurface