Revert "[Tizen] Revert "Use touch consumed return to set whether we process a gesture...
[platform/core/uifw/dali-core.git] / dali / integration-api / scene.h
index e396295..dc1db99 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_SCENE_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
@@ -41,6 +41,11 @@ namespace Internal DALI_INTERNAL
 class Scene;
 }
 
+namespace Graphics
+{
+class RenderTarget;
+}
+
 namespace Integration
 {
 struct Event;
@@ -66,20 +71,11 @@ public:
    * @brief Create an initialized Scene handle.
    *
    * @param[in] size The size of the set surface for this scene
+   * @param[in] orientation The rotated angle of the set surface for this scene
    *
    * @return a handle to a newly allocated Dali resource.
    */
-  static Scene New(Size size);
-
-  /**
-   * @brief Create an initialized Scene handle.
-   *
-   * @param[in] size The size of the set surface for this scene
-   * @param[in] orientation The orientation of the set surface for this scene
-   *
-   * @return a handle to a newly allocated Dali resource.
-   */
-  static Scene New( Size size, int orientation );
+  static Scene New(Size size, int32_t orientation = 0);
 
   /**
    * @brief Downcast an Object handle to Scene handle.
@@ -227,6 +223,13 @@ public:
   void Discard();
 
   /**
+   * @brief Sets the render target for the surface.
+   *
+   * @param[in] renderTarget The render target for the surface
+   */
+  void SetSurfaceRenderTarget(Graphics::RenderTarget* renderTarget);
+
+  /**
    * @brief Retrieve the Scene that the given actor belongs to.
    * @return The Scene.
    */
@@ -251,7 +254,7 @@ public:
    *
    * @note A callback of the following type may be used:
    * @code
-   *   void MyFunction( int frameId );
+   *   void MyFunction( int32_t frameId );
    * @endcode
    * This callback will be deleted once it is called.
    *
@@ -267,7 +270,7 @@ public:
    *
    * @note A callback of the following type may be used:
    * @code
-   *   void MyFunction( int frameId );
+   *   void MyFunction( int32_t frameId );
    * @endcode
    * This callback will be deleted once it is called.
    *
@@ -294,6 +297,35 @@ public:
   void GetFramePresentedCallback(FrameCallbackContainer& callbacks);
 
   /**
+   * @brief Informs the scene that the set surface has been rotated.
+   *
+   * @param[in] width The width of rotated surface
+   * @param[in] height The height of rotated surface
+   * @param[in] orientation The orientation of rotated surface
+   */
+  void SurfaceRotated(float width, float height, int32_t orientation);
+
+  /**
+   * @brief Gets the current surface orientation. It gets the value from the scene object.
+   *
+   * @return The current surface orientation.
+   */
+  int32_t GetCurrentSurfaceOrientation() const;
+
+  /**
+   * @brief Gets the current surface rectangle. It gets the value from the scene object.
+   *
+   * @return The current surface rectangle
+   */
+  const Rect<int32_t>& GetCurrentSurfaceRect() const;
+
+  /**
+   * Query wheter the surface rect is changed or not.
+   * @return true if the surface rect is changed.
+   */
+  bool IsSurfaceRectChanged() const;
+
+  /**
    * @brief This signal is emitted just after the event processing is finished.
    *
    * @return The signal to connect to