[dali_1.3.40] Merge branch 'devel/master'
[platform/core/uifw/dali-core.git] / dali / internal / update / manager / update-manager.h
index ccecef8..d87d280 100644 (file)
@@ -22,6 +22,8 @@
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/common/dali-common.h>
 
+#include <dali/devel-api/common/stage-devel.h>
+
 #include <dali/internal/common/message.h>
 #include <dali/internal/common/type-abstraction-enums.h>
 #include <dali/internal/common/shader-saver.h>
@@ -43,6 +45,8 @@
 namespace Dali
 {
 
+class FrameCallbackInterface;
+
 namespace Integration
 {
 class GlSyncAbstraction;
@@ -585,6 +589,11 @@ public:
   void KeepRendering( float durationSeconds );
 
   /**
+   * @copydoc Dali::DevelStage::SetRenderingBehavior()
+   */
+  void SetRenderingBehavior( DevelStage::Rendering renderingBehavior );
+
+  /**
    * Sets the depths of all layers.
    * @param layers The layers in depth order.
    * @param[in] systemLevel True if using the system-level overlay.
@@ -597,6 +606,25 @@ public:
    */
   void SetDepthIndices( OwnerPointer< NodeDepths >& nodeDepths );
 
+  /**
+   * Query wheter the default surface rect is changed or not.
+   * @return true if the default surface rect is changed.
+   */
+  bool IsDefaultSurfaceRectChanged();
+
+  /**
+   * Adds an implementation of the FrameCallbackInterface.
+   * @param[in] frameCallback A pointer to the implementation of the FrameCallbackInterface
+   * @param[in] rootNode A pointer to the root node to apply the FrameCallback to
+   */
+  void AddFrameCallback( FrameCallbackInterface* frameCallback, const Node* rootNode );
+
+  /**
+   * Removes the specified implementation of FrameCallbackInterface.
+   * @param[in] frameCallback A pointer to the implementation of the FrameCallbackInterface to remove.
+   */
+  void RemoveFrameCallback( FrameCallbackInterface* frameCallback );
+
 private:
 
   // Undefined
@@ -952,6 +980,17 @@ inline void KeepRenderingMessage( UpdateManager& manager, float durationSeconds
   new (slot) LocalType( &manager, &UpdateManager::KeepRendering, durationSeconds );
 }
 
+inline void SetRenderingBehaviorMessage( UpdateManager& manager, DevelStage::Rendering renderingBehavior )
+{
+  typedef MessageValue1< UpdateManager, DevelStage::Rendering > LocalType;
+
+  // Reserve some memory inside the message queue
+  unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
+
+  // Construct message in the message queue memory; note that delete should not be called on the return value
+  new (slot) LocalType( &manager, &UpdateManager::SetRenderingBehavior, renderingBehavior );
+}
+
 /**
  * Create a message for setting the depth of a layer
  * @param[in] manager The update manager
@@ -1313,6 +1352,27 @@ inline void AddResetterMessage( UpdateManager& manager, OwnerPointer<PropertyRes
   new (slot) LocalType( &manager, &UpdateManager::AddPropertyResetter, resetter );
 }
 
+inline void AddFrameCallbackMessage( UpdateManager& manager, FrameCallbackInterface& frameCallback, const Node& rootNode )
+{
+  typedef MessageValue2< UpdateManager, FrameCallbackInterface*, const Node* > LocalType;
+
+  // Reserve some memory inside the message queue
+  unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
+
+  // Construct message in the message queue memory; note that delete should not be called on the return value
+  new (slot) LocalType( &manager, &UpdateManager::AddFrameCallback, &frameCallback, &rootNode );
+}
+
+inline void RemoveFrameCallbackMessage( UpdateManager& manager, FrameCallbackInterface& frameCallback )
+{
+  typedef MessageValue1< UpdateManager, FrameCallbackInterface* > LocalType;
+
+  // Reserve some memory inside the message queue
+  unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
+
+  // Construct message in the message queue memory; note that delete should not be called on the return value
+  new (slot) LocalType( &manager, &UpdateManager::RemoveFrameCallback, &frameCallback );
+}
 
 } // namespace SceneGraph