2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiAnimIVisualElementAnimationValueInterpolator.h
20 * @brief This is the header file for the %IVisualElementAnimationValueInterpolator interface.
22 * This header file contains the declarations of the %IVisualElementAnimationValueInterpolator interface.
25 #ifndef _FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_VALUE_INTERPOLATOR_H_
26 #define _FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_VALUE_INTERPOLATOR_H_
28 #include <FBaseObject.h>
29 #include <FUiVariant.h>
31 namespace Tizen { namespace Ui { namespace Animations
36 * @interface IVisualElementAnimationValueInterpolator
37 * @brief This interface implements the interpolator for the VisualElementAnimation defined in the Tizen::Ui::Animations namespace.
41 * The %IVisualElementAnimationValueInterpolator interface is the interpolator interface for interpolating on animation progress.
42 * The class that interpolates start value and end value implements this interface,
43 * and the instance created with that class is registered with an animation,
44 * using the VisualElementAnimation::SetValueInterpolator() method or the AnimationTransaction::SetVisualElementAnimationValueInterpolator() method.
45 * When tick of the animation occurs, a method of that instance is invoked.
47 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/interpolating_visualelement.htm">Interpolation</a>.
50 class _OSP_EXPORT_ IVisualElementAnimationValueInterpolator
55 * This is the default constructor for this class.
59 IVisualElementAnimationValueInterpolator(void);
63 * This is the destructor for this class.
67 virtual ~IVisualElementAnimationValueInterpolator(void);
71 * Calculates the interpolated value based on the time. @n
72 * The %Interpolate() method will be called on every frame of an animation to calculate the current value of the specified @c progress.
76 * @return An error code
77 * @param[in] progress The progress value from @c startValue to @c endValue @n
78 * The range of @c progress is decided by the IVisualElementAnimationTimingFunction interface.
79 * @param[in] startValue The start value
80 * @param[in] endValue The end value
81 * @param[out] value The interpolated value based on the time
82 * @exception E_SUCCESS The method is successful.
83 * @remarks If result is not E_SUCCESS, use @c startValue for the animation.
85 virtual result Interpolate(float progress, const Tizen::Ui::Variant& startValue, const Tizen::Ui::Variant& endValue, Tizen::Ui::Variant& value) const = 0;
91 // This method is for internal use only. Using this method can cause behavioral, security-related,
92 // and consistency-related issues in the application.
94 // This is the assignment operator for this class.
98 IVisualElementAnimationValueInterpolator(const IVisualElementAnimationValueInterpolator& rhs);
102 // This method is for internal use only. Using this method can cause behavioral, security-related,
103 // and consistency-related issues in the application.
105 // Assigns the value of the specified instance to the current instance of %IVisualElementAnimationValueInterpolator.
109 IVisualElementAnimationValueInterpolator& operator =(const IVisualElementAnimationValueInterpolator& rhs);
110 }; // IVisualElementAnimationValueInterpolator
113 }}} // Tizen::Ui::Animations
115 #endif //_FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_VALUE_INTERPOLATOR_H_