X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fcommon%2Fscene-impl.h;h=ab55a3a0931d95a9b4ce9a3a3e33821501dd0d3b;hb=d353bae63798f48237dc24c078c2e8cb2aa0bc62;hp=2c3f3d41425776fb76b0aee60dc0408f8af13792;hpb=182acae4df2a65a6876414c9540a3633a18911ff;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/common/scene-impl.h b/dali/internal/event/common/scene-impl.h index 2c3f3d4..ab55a3a 100644 --- a/dali/internal/event/common/scene-impl.h +++ b/dali/internal/event/common/scene-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_SCENE_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -35,13 +34,18 @@ namespace Dali namespace Integration { -class Event; +struct Event; } namespace Internal { +namespace SceneGraph +{ +class Scene; +} + class EventProcessor; class Layer; class LayerList; @@ -62,7 +66,7 @@ public: /** * @copydoc Dali::Integration::Scene::New */ - static ScenePtr New( const Size& size ); + static ScenePtr New( Size size ); /** * virtual destructor @@ -115,15 +119,24 @@ public: Dali::Layer GetLayer(uint32_t depth) const; /** - * @copydoc Dali::Integration::Scene::SetSurface + * Notify the surface has been resized. + * + * @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 ); + + /** + * @copydoc Dali::Integration::Scene::SurfaceReplaced */ - void SetSurface( Integration::RenderSurface& surface ); + void SurfaceReplaced(); /** - * Retrieve the render surface the scene is binded to. - * @return The render surface. + * @copydoc Dali::Integration::Scene::Discard */ - Integration::RenderSurface* GetSurface() const; + void Discard(); /** * Retrieve the ordered list of on-scene layers. @@ -154,10 +167,10 @@ public: void RebuildDepthTree(); /** - * @brief Sets the background color of the render surface. + * @brief Sets the background color of the render surface. * @param[in] color The new background color */ - void SetBackgroundColor(Vector4 color); + void SetBackgroundColor( const Vector4& color ); /** * @brief Gets the background color of the render surface. @@ -166,6 +179,13 @@ public: Vector4 GetBackgroundColor() const; /** + * @brief Get the Scene scene graph object + * + * @return the Scene scene graph object + */ + SceneGraph::Scene* GetSceneObject() const; + + /** * Used by the EventProcessor to emit key event signals. * @param[in] event The key event. */ @@ -248,12 +268,14 @@ public: private: // Constructor - Scene( const Size& size ); + Scene(); /** * Second-phase constructor. + * + * @param[in] size The size of the set surface */ - void Initialize(); + void Initialize( Size size ); // Undefined Scene(const Scene&) = delete; @@ -262,14 +284,17 @@ private: Scene& operator=(const Scene& rhs) = delete; private: - Integration::RenderSurface* mSurface; + Internal::SceneGraph::Scene* mSceneObject; - // The scene-size may be different with the surface-size Size mSize; - Size mSurfaceSize; Vector2 mDpi; + Vector4 mBackgroundColor; + + // The SurfaceOrientation + int mSurfaceOrientation; + LayerPtr mRootLayer; // Ordered list of currently on-stage layers @@ -280,9 +305,6 @@ private: // The list of render-tasks IntrusivePtr mRenderTaskList; - // The frame buffer - FrameBufferPtr mFrameBuffer; - bool mDepthTreeDirty:1; ///< True if the depth tree needs recalculating EventProcessor mEventProcessor;