Convert shaders in devel-api header files to use shader compilation tool
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / magnifier / magnifier.h
index 95c5a2b..bf0ca8e 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_TOOLKIT_MAGNIFIER_H__
-#define __DALI_TOOLKIT_MAGNIFIER_H__
+#ifndef DALI_TOOLKIT_MAGNIFIER_H
+#define DALI_TOOLKIT_MAGNIFIER_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.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal DALI_INTERNAL
 {
 class Magnifier;
@@ -41,16 +39,38 @@ class Magnifier;
  * to the stage as a separate overlay. In addition to the contents, an optional frame
  * is displayed around the magnified contents.
  */
-class DALI_IMPORT_API Magnifier : public Control
+class DALI_TOOLKIT_API Magnifier : public Control
 {
 public:
+  /**
+   * @brief The start and end property ranges for this control.
+   */
+  enum PropertyRange
+  {
+    PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
+    PROPERTY_END_INDEX   = PROPERTY_START_INDEX + 1000, ///< Reserve property indices
 
-  // Custom properties
+    ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,
+    ANIMATABLE_PROPERTY_END_INDEX   = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices
+  };
 
-  static const std::string SOURCE_POSITION_PROPERTY_NAME;                   ///< Property, name "source-position",              type Vector3
+  /**
+   * @brief An enumeration of properties belonging to the Magnifier class.
+   */
+  struct Property
+  {
+    enum
+    {
+      // Event side properties
+      FRAME_VISIBILITY = PROPERTY_START_INDEX, ///< name "frameVisibility",       Whether a frame is visible or not,         type boolean
+      MAGNIFICATION_FACTOR,                    ///< name "magnificationFactor",   Larger value means greater magnification,  type float
+
+      // Animatable properties
+      SOURCE_POSITION = ANIMATABLE_PROPERTY_START_INDEX, ///< name "sourcePosition",  The position of the source,  type Vector3
+    };
+  };
 
 public:
-
   /**
    * Creates an empty Magnifier handle
    */
@@ -60,12 +80,12 @@ public:
    * Copy constructor. Creates another handle that points to the same real object
    * @param handle to copy from
    */
-  Magnifier( const Magnifier& handle );
+  Magnifier(const Magnifier& handle);
 
   /**
    * Assignment operator. Changes this handle to point to another real object
    */
-  Magnifier& operator=( const Magnifier& handle );
+  Magnifier& operator=(const Magnifier& handle);
 
   /**
    * @brief Destructor
@@ -86,53 +106,16 @@ public:
    * @param[in] handle Handle to an object
    * @return handle to a Magnifier or an uninitialized handle
    */
-  static Magnifier DownCast( BaseHandle handle );
+  static Magnifier DownCast(BaseHandle handle);
 
 public:
-
   /**
    * Set the actors to be rendered in magnifier.
    * @param[in] actor This actor and its children will be rendered.
    */
   void SetSourceActor(Actor actor);
 
-  /**
-   * Set the source camera position to render in magnifier
-   * @param[in] position The target position from which to render source.
-   */
-  void SetSourcePosition(Vector3 position);
-
-  /**
-   * Returns whether the frame is visible or not.
-   * @return true if frame is visible, false if not.
-   */
-  bool GetFrameVisibility() const;
-
-  /**
-   * Sets whether the frame part of the magnifier should be visible
-   * or not.
-   * @param[in] visible true to display frame, false to hide frame.
-   */
-  void SetFrameVisibility(bool visible);
-
-  /**
-   * Get the magnification factor of the magnifier
-   * The larger the value the larger the contents magnified.
-   * A value of 1.0f indications 1x magnification.
-   * @return Magnification factor is returned
-   */
-  float GetMagnificationFactor() const;
-
-  /**
-   * Set the magnification factor of the magnifier
-   * The larger the value the larger the contents magnified.
-   * A value of 1.0f indications 1x magnification.
-   * @param[in] value Magnification factor.
-   */
-  void SetMagnificationFactor(float value);
-
 public: // Not intended for application developers
-
   /**
    * Creates a handle using the Toolkit::Internal implementation.
    * @param[in]  implementation  The Control implementation.
@@ -150,4 +133,4 @@ public: // Not intended for application developers
 
 } // namespace Dali
 
-#endif // __DALI_TOOLKIT_MAGNIFIER_H__
+#endif // DALI_TOOLKIT_MAGNIFIER_H