[dali_2.3.42] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / control.h
index a7aee35..7da13e8 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_CONTROL_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -33,6 +33,7 @@ namespace Dali
 {
 namespace Toolkit
 {
+class RenderEffect;
 //Forward declarations.
 
 namespace Internal
@@ -147,12 +148,16 @@ public:
      */
     enum Direction
     {
-      LEFT,     ///< Move keyboard focus towards the left direction @SINCE_1_0.0
-      RIGHT,    ///< Move keyboard focus towards the right direction @SINCE_1_0.0
-      UP,       ///< Move keyboard focus towards the up direction @SINCE_1_0.0
-      DOWN,     ///< Move keyboard focus towards the down direction @SINCE_1_0.0
-      PAGE_UP,  ///< Move keyboard focus towards the previous page direction @SINCE_1_2.14
-      PAGE_DOWN ///< Move keyboard focus towards the next page direction @SINCE_1_2.14
+      LEFT,              ///< Move keyboard focus towards the left direction @SINCE_1_0.0
+      RIGHT,             ///< Move keyboard focus towards the right direction @SINCE_1_0.0
+      UP,                ///< Move keyboard focus towards the up direction @SINCE_1_0.0
+      DOWN,              ///< Move keyboard focus towards the down direction @SINCE_1_0.0
+      PAGE_UP,           ///< Move keyboard focus towards the previous page direction @SINCE_1_2.14
+      PAGE_DOWN,         ///< Move keyboard focus towards the next page direction @SINCE_1_2.14
+      FORWARD,           ///< Move keyboard focus towards the forward direction @SINCE_2_1.10
+      BACKWARD,          ///< Move keyboard focus towards the backward direction @SINCE_2_1.10
+      CLOCKWISE,         ///< Move keyboard focus towards the clockwise direction @SINCE_2_1.14
+      COUNTER_CLOCKWISE, ///< Move keyboard focus towards the counter clockwise direction @SINCE_2_1.14
     };
   };
 
@@ -169,6 +174,20 @@ public:
 
 public: // Creation & Destruction
   /**
+   * @brief Additional control behaviour flags for the control constructor.
+   * @note TODO : Currunt code is hard-coded. We Should sync type values as
+   * CustomActorImpl::ActorFlag and Internal::Control::ControlBehaviour in future.
+   * @SINCE_2_1.8
+   */
+  enum ControlBehaviour
+  {
+    CONTROL_BEHAVIOUR_DEFAULT            = 0,            ///< Default behaviour: Size negotiation is enabled & listens to Style Change signal, but doesn't receive event callbacks. @SINCE_1_2_10
+    DISABLE_SIZE_NEGOTIATION             = 1 << (0 + 0), ///< True if control does not need size negotiation, i.e. it can be skipped in the algorithm @SINCE_1_0.0
+    REQUIRES_KEYBOARD_NAVIGATION_SUPPORT = 1 << (4 + 1), ///< True if needs to support keyboard navigation @SINCE_1_0.0
+    DISABLE_STYLE_CHANGE_SIGNALS         = 1 << (4 + 2), ///< True if control should not monitor style change signals @SINCE_1_2_10
+  };
+
+  /**
    * @brief Creates a new instance of a Control.
    *
    * @SINCE_1_0.0
@@ -177,6 +196,15 @@ public: // Creation & Destruction
   static Control New();
 
   /**
+   * @brief Creates a new instance of a Control with additional behaviour.
+   *
+   * @SINCE_2_1.8
+   * @param[in] additionalBehaviour Additional control behaviour
+   * @return A handle to a new Control
+   */
+  static Control New(ControlBehaviour additionalBehaviour);
+
+  /**
    * @brief Creates an uninitialized Control handle.
    *
    * Only derived versions can be instantiated.  Calling member
@@ -200,7 +228,7 @@ public: // Creation & Destruction
    * @SINCE_1_9.23
    * @param[in] rhs Handle to move
    */
-  Control(Control&& rhs);
+  Control(Control&& rhs) noexcept;
 
   /**
    * @brief Dali::Control is intended as a base class.
@@ -228,7 +256,7 @@ public: // operators
    * @param[in] rhs Object to assign this to
    * @return Reference to this
    */
-  Control& operator=(Control&& rhs);
+  Control& operator=(Control&& rhs) noexcept;
 
 public:
   /**
@@ -354,6 +382,22 @@ public:
    */
   void ClearBackground();
 
+  /**
+   * @brief Sets RenderEffect to this control.
+   *
+   * @SINCE_2_3.25
+   * @param[in] effect RenderEffect to add.
+   *
+   * @note Every effect inherits RenderEffect.
+   */
+  void SetRenderEffect(Toolkit::RenderEffect effect);
+
+  /**
+   * @brief Clears RenderEffect of this control, if exists.
+   * @SINCE_2_3.25
+   */
+  void ClearRenderEffect();
+
   // Resources
 
   /**
@@ -456,6 +500,7 @@ public:
    * @note A RelayoutRequest is queued by Control before this signal is emitted
    */
   ResourceReadySignalType& ResourceReadySignal();
+
 public: // Intended for control developers
   /**
    * @brief Creates an initialized Control.