Add Overlay Layer in window
[platform/core/uifw/dali-adaptor.git] / dali / integration-api / adaptor-framework / scene-holder-impl.h
index 7eb7e56..8cb30c3 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTEGRATION_INTERNAL_SCENEHOLDER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -19,6 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
+#include <dali/graphics-api/graphics-controller.h>
 #include <dali/integration-api/events/key-event-integ.h>
 #include <dali/integration-api/events/point.h>
 #include <dali/integration-api/events/touch-event-combiner.h>
@@ -83,6 +84,11 @@ public:
   Dali::Layer GetRootLayer() const;
 
   /**
+   * @copydoc Dali::Integration::SceneHolder::GetOverlayLayer
+   */
+  Dali::Layer GetOverlayLayer();
+
+  /**
    * @brief Gets the window name.
    * @return The name of the window
    */
@@ -114,8 +120,10 @@ public:
 
   /**
    * @brief Called when the surface set is resized.
+   * @param[in] width the resized window's width
+   * @param[in] height the resized window's height
    */
-  void SurfaceResized();
+  void SurfaceResized(float width, float height);
 
   /**
    * @brief Get the render surface
@@ -164,9 +172,16 @@ public:
    *
    * @param[in] width The width of rotated surface
    * @param[in] height The height of rotated surface
-   * @param[in] orientation The orientation of rotated surface
+   * @param[in] windowOrientation the current window orientation
+   * @param[in] screenOrientation the current screen orientation
+   */
+  void SurfaceRotated(float width, float height, int32_t windowOrientation, int32_t screenOrientation);
+
+  /**
+   * @brief Send message to acknowledge window rotation with current window orientation.
+   * It is to send message to render thread for completing window rotation by user.
    */
-  void SurfaceRotated(float width, float height, int orientation);
+  void SetRotationCompletedAcknowledgement();
 
   /**
    * @copydoc Dali::Integration::SceneHolder::FeedTouchPoint
@@ -216,6 +231,11 @@ public:
   void AddFramePresentedCallback(std::unique_ptr<CallbackBase> callback, int32_t frameId);
 
   /**
+   * @brief Creates the render target for the surface when the surface is created/resized/replaced.
+   */
+  void CreateRenderTarget();
+
+  /**
    * @copydoc Dali::Integration::SceneHolder::Get()
    */
   static Dali::Integration::SceneHolder Get(Dali::Actor actor);
@@ -237,6 +257,14 @@ public:
   }
 
   /**
+   * @copydoc Dali::Integration::SceneHolder::InterceptKeyEventSignal()
+   */
+  Dali::Integration::SceneHolder::KeyEventGeneratedSignalType& InterceptKeyEventSignal()
+  {
+    return mScene.InterceptKeyEventSignal();
+  }
+
+  /**
    * @copydoc Dali::Integration::SceneHolder::TouchedSignal()
    */
   Dali::Integration::SceneHolder::TouchEventSignalType& TouchedSignal()
@@ -252,6 +280,14 @@ public:
     return mScene.WheelEventSignal();
   }
 
+  /**
+   * @copydoc Dali::Integration::SceneHolder::WheelEventGeneratedSignal()
+   */
+  Dali::Integration::SceneHolder::WheelEventGeneratedSignalType& WheelEventGeneratedSignal()
+  {
+    return mScene.WheelEventGeneratedSignal();
+  }
+
 public: // The following methods can be overridden if required
   /**
    * @brief Returns whether the Scene is visible or not.
@@ -304,10 +340,14 @@ private: // The following methods can be overridden if required
   virtual void OnResume(){};
 
   /**
-   * Recalculate the touch position if required
-   * @param[in,out] point The touch point
+   * Recalculate the position if required
+   * @param[in] position The screen position
+   * @return converted position by oriention
    */
-  virtual void RecalculateTouchPosition(Integration::Point& point){};
+  virtual Vector2 RecalculatePosition(const Vector2& position)
+  {
+    return position;
+  };
 
 private:
   /**