#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.
class Scene;
}
+namespace Graphics
+{
+class RenderTarget;
+}
+
namespace Integration
{
struct Event;
* @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);
+ static Scene New(Size size, int32_t orientation = 0);
/**
* @brief Downcast an Object handle to Scene handle.
*
* @param[in] width The new width of the set surface
* @param[in] height The new height of the set surface
- * @param[in] orientation The orientation of the surface
- * @param[in] forceUpdate The flag to update force
*/
- void SurfaceResized(float width, float height, int orientation, bool forceUpdate);
+ void SurfaceResized(float width, float height);
/**
* @brief Informs the scene that the surface has been replaced.
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.
*/
*
* @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.
*
*
* @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.
*
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