Revert "[Tizen] Property Notify for orientation changes"
[platform/core/uifw/dali-core.git] / dali / internal / update / common / property-condition-step-functions.h
index 4c66c07..57fe42c 100644 (file)
@@ -1,38 +1,36 @@
-#ifndef __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H__
-#define __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H__
-
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+#ifndef DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H
+#define DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H
+
+/*
+ * Copyright (c) 2021 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 // INTERNAL INCLUDES
-#include <dali/public-api/object/property-value.h>
 #include <dali/internal/update/common/scene-graph-property-notification.h>
+#include <dali/public-api/object/property-value.h>
 
 namespace Dali
 {
-
 namespace Internal
 {
-
-class ProxyObject;
+class Object;
 class PropertyNotification;
 
 namespace SceneGraph
 {
-
 /**
  * Step condition class,
  * Checks if a Property has stepped a certain amount from the reference point
@@ -45,18 +43,31 @@ namespace SceneGraph
  */
 class Step
 {
-
 public:
+  /**
+   * @return function pointer to the correct condition function, based on
+   * the type of value being examined.
+   */
+  static ConditionFunction GetFunction(Property::Type valueType);
 
   /**
    * @return function pointer to the correct condition function, based on
    * the type of value being examined.
+   *
+   * This function pointer is to compare previous and current components for the swapping case.
    */
-  static ConditionFunction GetFunction( Property::Type valueType );
+  static ConditionFunction GetCompareFunction(Property::Type valueType);
 
 private:
+  static bool Evaluate(const float propertyValue, PropertyNotification::RawArgumentContainer& arg);
 
-  static bool Evaluate( const float propertyValue, PropertyNotification::RawArgumentContainer& arg );
+  /**
+   * Checks if integer is Outside
+   * @param[in] value The value being examined.
+   * @param[in] arg The supplied arguments for the condition.
+   * @return Condition result (true if condition met, false if not)
+   */
+  static bool EvalInteger(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
 
   /**
    * Checks if float is Outside
@@ -64,7 +75,7 @@ private:
    * @param[in] arg The supplied arguments for the condition.
    * @return Condition result (true if condition met, false if not)
    */
-  static bool EvalFloat( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
+  static bool EvalFloat(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
 
   /**
    * Checks if Vector2.Length() is Outside
@@ -72,15 +83,26 @@ private:
    * @param[in] arg The supplied arguments for the condition.
    * @return Condition result (true if condition met, false if not)
    */
-  static bool EvalVector2( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
+  static bool EvalVector2(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
+
+  /**
+   * Checks if Vector3.Length() is Outside
+   * @param[in] value The value being examined.
+   * @param[in] arg The supplied arguments for the condition.
+   * @return Condition result (true if condition met, false if not)
+   */
+  static bool EvalVector3(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
 
   /**
    * Checks if Vector3.Length() is Outside
+   *
+   * If previous Vector3.Lenght() and current are same, the raw datas are checked with comparing these values.
+   *
    * @param[in] value The value being examined.
    * @param[in] arg The supplied arguments for the condition.
    * @return Condition result (true if condition met, false if not)
    */
-  static bool EvalVector3( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
+  static bool EvalAndCompareVector3(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
 
   /**
    * Checks if Vector4.Length() is Outside
@@ -88,7 +110,7 @@ private:
    * @param[in] arg The supplied arguments for the condition.
    * @return Condition result (true if condition met, false if not)
    */
-  static bool EvalVector4( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
+  static bool EvalVector4(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
 
   /**
    * Default check for other types.
@@ -96,8 +118,7 @@ private:
    * @param[in] arg The supplied arguments for the condition.
    * @return Condition result (true if condition met, false if not)
    */
-  static bool EvalDefault( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
-
+  static bool EvalDefault(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
 };
 
 } // namespace SceneGraph
@@ -106,4 +127,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H__
+#endif // DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H