Formatting API
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / bubble-effect / bubble-emitter.h
index a9a5c3a..d4381fa 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_TOOLKIT_BUBBLE_EMMITER_H__
-#define __DALI_TOOLKIT_BUBBLE_EMMITER_H__
+#ifndef DALI_TOOLKIT_BUBBLE_EMMITER_H
+#define DALI_TOOLKIT_BUBBLE_EMMITER_H
 
 /*
- * Copyright (c) 2015 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.
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
+#include <dali/public-api/rendering/texture.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal DALI_INTERNAL
 {
-  /**
+/**
    * @brief BubbleEmitter implementation class.
    */
-  class BubbleEmitter;
-}
+class BubbleEmitter;
+} // namespace DALI_INTERNAL
 
 /**
  * @brief BubbleEmitter is used to display lots of moving bubbles on the stage.
  *
  * This is done by applying BubbleEffect to multiple specifically created meshActors.
  */
-class DALI_IMPORT_API BubbleEmitter : public Control
+class DALI_TOOLKIT_API BubbleEmitter : public Control
 {
 public:
-
   /**
    * @brief Create an empty BubbleEmitter handle.
    */
@@ -58,16 +56,15 @@ public:
    * @brief Create an initialized BubbleEmitter.
    *
    * @param[in] winSize The size of the bubble moving area, usually the same size as the background.
-   * @param[in] shapeImage The alpha channnel of this texture defines the bubble shape.
+   * @param[in] shapeTexture The alpha channnel of this texture defines the bubble shape.
    * @param[in] maximumNumberOfBubble The maximum number of bubble needed.
    * @param[in] bubbleSizeRange The size range of the bubbles; x component is the low bound, and y component is the up bound.
    * @return The initialized BubbleEmitter object.
    */
-  static BubbleEmitter New( const Vector2& winSize,
-                            Image shapeImage,
-                            unsigned int maximumNumberOfBubble,
-                            const Vector2& bubbleSizeRange );
-
+  static BubbleEmitter New(const Vector2& winSize,
+                           Dali::Texture  shapeTexture,
+                           unsigned int   maximumNumberOfBubble,
+                           const Vector2& bubbleSizeRange);
 
   /**
    * @brief Copy constructor.
@@ -75,7 +72,7 @@ public:
    * Creates another handle that points to the same real object
    * @param[in] handle The handle to copy
    */
-  BubbleEmitter( const BubbleEmitter& handle );
+  BubbleEmitter(const BubbleEmitter& handle);
 
   /**
    * @brief Assignment operator.
@@ -84,7 +81,7 @@ public:
    * @param[in] rhs The object to point at
    * @return A reference to this
    */
-  BubbleEmitter& operator=( const BubbleEmitter& rhs );
+  BubbleEmitter& operator=(const BubbleEmitter& rhs);
 
   /**
    * @brief Downcast an Object handle to SuperBlurView.
@@ -94,7 +91,7 @@ public:
    * @param[in] handle Handle to an object
    * @return handle to a BubbleEmitter or an uninitialized handle
    */
-  static BubbleEmitter DownCast( BaseHandle handle );
+  static BubbleEmitter DownCast(BaseHandle handle);
 
   /**
    * @brief Return the root actor of all bubbles, should then be added to stage.
@@ -107,26 +104,26 @@ public:
    * @brief Set Background image.
    *
    * The bubbles pick color from this image with HSV values adjusted.
-   * @param[in] bgImage The background image which provide color to bubbles.
+   * @param[in] bgTexture The background texture which provide color to bubbles.
    * @param[in] hsvDelta The hsv channel difference used to adjust the background image color.
    *            If set these vector as Vector3::Zero, original colors are used.
    */
-  void SetBackground( Image bgImage, const Vector3& hsvDelta );
+  void SetBackground(Dali::Texture bgTexture, const Vector3& hsvDelta);
 
   /**
    * @brief Set bubble shape.
    *
-   * The bubble mesh is a rectangular patch, but its displayed shape is decided by the alpha channel of the shape image.
-   * @param[in] shapeImage The image whose alpha channel defines the bubble shape.
+   * The bubble mesh is a rectangular patch, but its displayed shape is decided by the alpha channel of the shape texture.
+   * @param[in] shapeTexture The texture whose alpha channel defines the bubble shape.
    */
-  void SetShapeImage( Image shapeImage );
+  void SetBubbleShape(Dali::Texture shapeTexture);
 
   /**
    * @brief Set the scale factor applied to all the bubbles.
    *
    * @param [in] scale The scale factor applied on bubbles.
    */
-  void SetBubbleScale( float scale );
+  void SetBubbleScale(float scale);
 
   /**
    * @brief Set the density of the bubble.
@@ -137,7 +134,7 @@ public:
    * By set the density bigger than one, instead of emit one bubble each time, a 'density' number of bubbles are emitted.
    * @param[in] density The density of the bubble.
    */
-  void SetBubbleDensity( unsigned int density );
+  void SetBubbleDensity(unsigned int density);
 
   /**
    * @brief Add a bubble movement to the animation.
@@ -148,7 +145,7 @@ public:
    * @param[in] direction The direction used to constrain the bubble to move in an adjacent direction around it.
    * @param[in] displacement The displacement used to bound the moving distance of the bubble.
    */
-  void EmitBubble( Animation& animation, const Vector2& emitPosition, const Vector2& direction, const Vector2& displacement );
+  void EmitBubble(Animation& animation, const Vector2& emitPosition, const Vector2& direction, const Vector2& displacement);
 
   /**
    * @brief Reset all the parameters controlling the bubbles after animation.
@@ -156,7 +153,6 @@ public:
   void Restore();
 
 public: // Not intended for developer use
-
   /**
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
@@ -176,4 +172,4 @@ public: // Not intended for developer use
 
 } // namespace Dali
 
-#endif /* __DALI_TOOLKIT_BUBBLE_EMMITER_H__ */
+#endif /* DALI_TOOLKIT_BUBBLE_EMMITER_H */