Supports to acknowledge for completing window rotation
[platform/core/uifw/dali-core.git] / dali / internal / update / common / scene-graph-scene.h
index 0aaf50e..14bcb08 100644 (file)
@@ -138,7 +138,6 @@ public:
   /**
    * Set the surface orientation when surface is rotated.
    *
-   * @param[in] scene The rotated scene.
    * @param[in] orientation The orientation value representing the surface.
    */
   void SetSurfaceOrientation(int32_t orientation);
@@ -157,6 +156,17 @@ public:
   bool IsSurfaceRectChanged();
 
   /**
+   * @brief Set the internal flag to acknowledge surface rotation.
+   */
+  void SetRotationCompletedAcknowledgement();
+
+  /**
+   * @brief Query wheter is set to acknowledge for completing surface rotation.
+   * @return true it should be acknowledged.
+   */
+  bool IsRotationCompletedAcknowledgementSet();
+
+  /**
    * Set the render target of the surface
    *
    * @param[in] renderTarget The render target.
@@ -217,6 +227,7 @@ private:
   Rect<int32_t> mSurfaceRect;        ///< The rectangle of surface which is related ot this scene.
   int32_t       mSurfaceOrientation; ///< The orientation of surface which is related of this scene
   bool          mSurfaceRectChanged; ///< The flag of surface's rectangle is changed when is resized, moved or rotated.
+  bool          mRotationCompletedAcknowledgement; ///< The flag of sending the acknowledgement to complete window rotation.
 
   // Render pass and render target
 
@@ -278,6 +289,17 @@ inline void SetSurfaceOrientationMessage(EventThreadServices& eventThreadService
   new(slot) LocalType(&scene, &Scene::SetSurfaceOrientation, orientation);
 }
 
+inline void SetRotationCompletedAcknowledgementMessage(EventThreadServices& eventThreadServices, const Scene& scene)
+{
+  using LocalType = Message<Scene>;
+
+  // Reserve some memory inside the message queue
+  uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
+
+  // Construct message in the message queue memory; note that delete should not be called on the return value
+  new(slot) LocalType(&scene, &Scene::SetRotationCompletedAcknowledgement);
+}
+
 inline void SetSurfaceRenderTargetMessage(EventThreadServices& eventThreadServices, const Scene& scene, Graphics::RenderTarget* renderTarget)
 {
   using LocalType = MessageValue1<Scene, Graphics::RenderTarget*>;