Change RenderTaskList to behave like any other SceneGraph object
[platform/core/uifw/dali-core.git] / dali / internal / event / actors / layer-list.h
index 0f8e9f6..c934682 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_LAYER_LIST_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -18,6 +18,9 @@
  *
  */
 
+// EXTERNAL INCLUDES
+#include <cstdint> // uint32_t
+
 // INTERNAL INCLUDES
 #include <dali/public-api/common/vector-wrapper.h>
 
@@ -27,8 +30,12 @@ namespace Dali
 namespace Internal
 {
 
+namespace SceneGraph
+{
+class UpdateManager;
+}
+
 class Layer;
-class Stage;
 
 /**
  * An ordered list of layers.
@@ -42,10 +49,9 @@ public:
 
   /**
    * Create a new list of layers.
-   * @param[in] stage A reference to the stage.
-   * @param[in] systemLevel True if the layers are added via the SystemOverlay API.
+   * @param[in] updateManager A reference to the update manager.
    */
-  static LayerList* New( Stage& stage, bool systemLevel );
+  static LayerList* New( SceneGraph::UpdateManager& updateManager );
 
   /**
    * Non-virtual destructor; not suitable as a base class.
@@ -56,7 +62,7 @@ public:
    * Query the number of layers.
    * @return The number of layers.
    */
-  unsigned int GetLayerCount() const;
+  uint32_t GetLayerCount() const;
 
   /**
    * Retrieve the layer at a specified depth.
@@ -64,13 +70,13 @@ public:
    * @param[in] depth The depth.
    * @return The layer found at the given depth.
    */
-  Layer* GetLayer( unsigned int depth ) const;
+  Layer* GetLayer( uint32_t depth ) const;
 
   /**
    * Gets the depth of a given layer
    * @param layer which depth to check
    */
-  unsigned int GetDepth( const Layer* layer ) const;
+  uint32_t GetDepth( const Layer* layer ) const;
 
   /**
    * Register a layer with the stage.
@@ -127,14 +133,20 @@ public:
    */
   void MoveLayerBelow( const Layer& layer, const Layer& target );
 
+  /**
+   * Sets the root layer that this layer list belongs to
+   * @pre the root layer is created
+   * @param rootLayer The root layer
+   */
+  void SetRootLayer(Layer* rootLayer);
+
 private:
 
   /**
    * Protected constructor; see also LayerList::New().
-   * @param[in] stage A reference to the stage.
-   * @param[in] systemLevel True if the layers are added via the SystemOverlay API.
+   * @param[in] updateManager to send messages.
    */
-  LayerList( Stage& stage, bool systemLevel );
+  LayerList( SceneGraph::UpdateManager& updateManager );
 
   /**
    * A private helper method to set the depth for each layer.
@@ -145,9 +157,9 @@ private:
 
 private:
 
-  Stage& mStage;
+  SceneGraph::UpdateManager& mUpdateManager;
 
-  bool mIsSystemLevel; ///< True if the layers are added via the SystemOverlay API.
+  Layer* mRoot;        ///< The root layer that this ordered list of layers belong to
 
   typedef std::vector<Layer*> LayerContainer;