Fix to adjust the position of the partial Frame
[platform/framework/native/uifw.git] / inc / FUiAnimIVisualElementAnimationValueInterpolator.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17
18 /**
19  * @file        FUiAnimIVisualElementAnimationValueInterpolator.h
20  * @brief       This is the header file for the %IVisualElementAnimationValueInterpolator interface.
21  *
22  * This header file contains the declarations of the %IVisualElementAnimationValueInterpolator interface.
23  */
24
25 #ifndef _FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_VALUE_INTERPOLATOR_H_
26 #define _FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_VALUE_INTERPOLATOR_H_
27
28 #include <FBaseObject.h>
29 #include <FUiVariant.h>
30
31 namespace Tizen { namespace Ui { namespace Animations
32 {
33
34
35 /**
36  * @interface   IVisualElementAnimationValueInterpolator
37  * @brief               This interface implements the interpolator for the VisualElementAnimation defined in the Tizen::Ui::Animations namespace.
38  *
39  * @since               2.0
40  *
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.
46  *
47  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/interpolating_visualelement.htm">Interpolation</a>.
48  *
49  */
50 class _OSP_EXPORT_ IVisualElementAnimationValueInterpolator
51 {
52 public:
53
54         /**
55          * This is the default constructor for this class.
56          *
57          * @since       2.0
58          */
59         IVisualElementAnimationValueInterpolator(void);
60
61
62         /**
63          * This is the destructor for this class.
64          *
65          * @since       2.0
66          */
67         virtual ~IVisualElementAnimationValueInterpolator(void);
68
69
70         /**
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.
73          *
74          * @since       2.0
75          *
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.
84          */
85         virtual result Interpolate(float progress, const Tizen::Ui::Variant& startValue, const Tizen::Ui::Variant& endValue, Tizen::Ui::Variant& value) const = 0;
86
87
88 private:
89
90         //
91         // This method is for internal use only. Using this method can cause behavioral, security-related,
92         // and consistency-related issues in the application.
93         //
94         // This is the assignment operator for this class.
95         //
96         // @since  2.0
97         //
98         IVisualElementAnimationValueInterpolator(const IVisualElementAnimationValueInterpolator& rhs);
99
100
101         //
102         // This method is for internal use only. Using this method can cause behavioral, security-related,
103         // and consistency-related issues in the application.
104         //
105         // Assigns the value of the specified instance to the current instance of %IVisualElementAnimationValueInterpolator.
106         //
107         // @since  2.0
108         //
109         IVisualElementAnimationValueInterpolator& operator =(const IVisualElementAnimationValueInterpolator& rhs);
110 };              // IVisualElementAnimationValueInterpolator
111
112
113 }}}             // Tizen::Ui::Animations
114
115 #endif //_FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_VALUE_INTERPOLATOR_H_