Making DALi public API typesafe using guaranteed types; uint8_t, uint32_t
[platform/core/uifw/dali-core.git] / dali / public-api / render-tasks / render-task.h
index 87d5e35..064f535 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_RENDER_TASK_H__
 
 /*
- * Copyright (c) 2015 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/math/viewport.h>
 #include <dali/public-api/object/handle.h>
@@ -53,7 +56,7 @@ class RenderTask;
  * RenderTasks may optionally target a frame-buffer, otherwise the default GL surface is used;
  * typically this is a window provided by the native system.
  *
- * By default Dali provides a single RenderTask, which renders the entire actor hierachy using
+ * By default Dali provides a single RenderTask, which renders the entire actor hierarchy using
  * a default camera actor and GL surface. If stereoscopic rendering is enabled, Dali will create
  * two additional render tasks, on for each eye. Each render task will have its own camera parented
  * to the default camera actor.
@@ -81,7 +84,7 @@ class RenderTask;
  * | finished     | @ref FinishedSignal() |
  * @SINCE_1_0.0
  */
-class DALI_IMPORT_API RenderTask : public Handle
+class DALI_CORE_API RenderTask : public Handle
 {
 public:
 
@@ -171,12 +174,12 @@ public:
     REFRESH_ALWAYS = 1  ///< Process every frame. @SINCE_1_0.0
   };
 
-  static const bool         DEFAULT_EXCLUSIVE;     ///< false
-  static const bool         DEFAULT_INPUT_ENABLED; ///< true
-  static const Vector4      DEFAULT_CLEAR_COLOR;   ///< Color::BLACK
-  static const bool         DEFAULT_CLEAR_ENABLED; ///< false
-  static const bool         DEFAULT_CULL_MODE;     ///< true
-  static const unsigned int DEFAULT_REFRESH_RATE;  ///< REFRESH_ALWAYS
+  static const bool     DEFAULT_EXCLUSIVE;     ///< false
+  static const bool     DEFAULT_INPUT_ENABLED; ///< true
+  static const Vector4  DEFAULT_CLEAR_COLOR;   ///< Color::BLACK
+  static const bool     DEFAULT_CLEAR_ENABLED; ///< false
+  static const bool     DEFAULT_CULL_MODE;     ///< true
+  static const uint32_t DEFAULT_REFRESH_RATE;  ///< REFRESH_ALWAYS
 
   /**
    * @brief Creates an empty RenderTask handle.
@@ -301,7 +304,7 @@ public:
   /**
    * @brief Sets the frame-buffer used as a render target.
    * @SINCE_1_1.38
-   * @param[in] frameBuffer er A valid FrameBuffer handle to enable off-screen rendering, or an uninitialized handle to disable it
+   * @param[in] frameBuffer A valid FrameBuffer handle to enable off-screen rendering, or an uninitialized handle to disable it
    */
   void SetFrameBuffer( FrameBuffer frameBuffer );
 
@@ -473,14 +476,14 @@ public:
    * @SINCE_1_0.0
    * @param[in] refreshRate The new refresh rate
    */
-  void SetRefreshRate( unsigned int refreshRate );
+  void SetRefreshRate( uint32_t refreshRate );
 
   /**
    * @brief Queries the refresh-rate of the RenderTask.
    * @SINCE_1_0.0
    * @return The refresh-rate
    */
-  unsigned int GetRefreshRate() const;
+  uint32_t GetRefreshRate() const;
 
   /**
    * @brief Gets viewport coordinates for given world position.