#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.
*
*/
+// EXTERNAL INCLUDES
+#include <cstdint> // uint32_t
+
// INTERNAL INCLUDES
#include <dali/public-api/common/vector-wrapper.h>
namespace Internal
{
+namespace SceneGraph
+{
+class UpdateManager;
+}
+
class Layer;
-class Stage;
/**
* An ordered list of layers.
/**
* 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.
* 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.
* @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.
*/
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.
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;