1 #ifndef DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H
2 #define DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H
5 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/object/property-value.h>
23 #include <dali/internal/update/common/scene-graph-property-notification.h>
32 class PropertyNotification;
38 * Step condition class,
39 * Checks if a Property has stepped a certain amount from the reference point
41 * float => value has stepped arg1 amount from arg0.
42 * Vector2 => 2 dimensional length of vector has stepped arg1 amount from arg0.
43 * Vector3 => 3 dimensional length of vector has stepped arg1 amount from arg0.
44 * Vector4 => 4 dimensional length of vector has stepped arg1 amount from arg0.
45 * Default => return false.
53 * @return function pointer to the correct condition function, based on
54 * the type of value being examined.
56 static ConditionFunction GetFunction( Property::Type valueType );
60 static bool Evaluate( const float propertyValue, PropertyNotification::RawArgumentContainer& arg );
63 * Checks if integer is Outside
64 * @param[in] value The value being examined.
65 * @param[in] arg The supplied arguments for the condition.
66 * @return Condition result (true if condition met, false if not)
68 static bool EvalInteger( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
71 * Checks if float is Outside
72 * @param[in] value The value being examined.
73 * @param[in] arg The supplied arguments for the condition.
74 * @return Condition result (true if condition met, false if not)
76 static bool EvalFloat( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
79 * Checks if Vector2.Length() is Outside
80 * @param[in] value The value being examined.
81 * @param[in] arg The supplied arguments for the condition.
82 * @return Condition result (true if condition met, false if not)
84 static bool EvalVector2( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
87 * Checks if Vector3.Length() is Outside
88 * @param[in] value The value being examined.
89 * @param[in] arg The supplied arguments for the condition.
90 * @return Condition result (true if condition met, false if not)
92 static bool EvalVector3( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
95 * Checks if Vector4.Length() is Outside
96 * @param[in] value The value being examined.
97 * @param[in] arg The supplied arguments for the condition.
98 * @return Condition result (true if condition met, false if not)
100 static bool EvalVector4( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
103 * Default check for other types.
104 * @param[in] value The value being examined.
105 * @param[in] arg The supplied arguments for the condition.
106 * @return Condition result (true if condition met, false if not)
108 static bool EvalDefault( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
112 } // namespace SceneGraph
114 } // namespace Internal
118 #endif // DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H