Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / animations / FUiAnim_VisualElementAnimationTiming.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        FUiAnim_VisualElementAnimationTiming.h
20  * @brief       This is the header file for the _VisualElementAnimationTiming class.
21  *
22  * This header file contains the declarations of the _VisualElementAnimationTiming class.
23  */
24
25 #ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_TIMING_H_
26 #define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_TIMING_H_
27
28 #include <FBaseErrorDefine.h>
29 #include <FBaseObject.h>
30
31 namespace Tizen { namespace Ui { namespace Animations
32 {
33
34 /**
35  * @class        _VisualElementAnimationTiming
36  * @brief This class stores the information of a animation timing.
37  * @since 2.0
38  *
39  * This class provides animation timing related information.
40  */
41 class _VisualElementAnimationTiming
42         : public Tizen::Base::Object
43 {
44 public:
45
46         //
47         // This is the default constructor for this class.
48         //
49         _VisualElementAnimationTiming(void);
50
51         //
52         // This is the destructor for this class.
53         //
54         virtual ~_VisualElementAnimationTiming(void);
55
56         /**
57          * Gets the duration of the animation.
58          *
59          * @since 2.0
60          * @return      The duration of the animation in ms
61          */
62         long GetDuration(void) const;
63
64         /**
65          * Sets the duration of the animation in ms.
66          *
67          * @since 2.0
68          * @param[in]   duration                The duration of the animation in ms
69          */
70         void SetDuration(long duration);
71
72         /**
73          * Gets the time offset of the animation.
74          *
75          * @since 2.0
76          * @return      The time offset of the animation in ms
77          */
78         long GetOffset(void) const;
79
80         /**
81          * Sets the time offset of the animation in ms.
82          *
83          * @since 2.0
84          * @param[in]   timeOffset      The time offset of the animation in mss
85          */
86         void SetOffset(long offset);
87
88         /**
89          * Gets the time delay of the animation.
90          *
91          * @since 2.0
92          * @return      The time delay of the animation in ms
93          */
94         long GetDelay(void) const;
95
96         /**
97          * Sets the time delay of the animation in ms.
98          *
99          * @since 2.0
100          * @param[in]   timeDelay       The start time of the animation in ms
101          */
102         void SetDelay(long delay);
103
104         /**
105          * Gets the repeat count of the animation.
106          *
107          * @since 2.0
108          * @return      The repeat count of the animation
109          */
110         long GetRepeatCount(void) const;
111
112         /**
113          * Sets the repeat count of the animation.
114          *
115          * @since 2.0
116          * @param[in]   repeatCount             The repeat count of the animation
117          * @remarks             If repeatCount is 0, the animation will be repeated infinitely.
118          */
119         void SetRepeatCount(long repeatCount);
120
121         /**
122          * Gets the time scale value of the animation.
123          *
124          * @since 2.0
125          * @return      The time scale value of the animation
126          */
127         float GetScaleRatio(void) const;
128
129         /**
130          * Sets the time scale value of the animation.
131          *
132          * @since 2.0
133          * @param[in]   scale                   The time scale of the animation
134          * @remarks             If this value is 2.0, then the animation speed is 2 times fast.
135          */
136         void SetScaleRatio(float scale);
137
138         /**
139          * Checks whether the animation plays backwards after it finishes playing forwards.
140          *
141          * @since 2.0
142          * @return      @c true if the animation plays backwards after it finishes playing forwards @n
143          *          @c false, otherwise
144          */
145         bool IsAutoReverseEnabled(void) const;
146
147         /**
148          * Sets the flag to play backwards after the animation finishes playing forwards.
149          *
150          * @since 2.0
151          * @param[in]   enable          Set to @c true to enable auto reverse @n
152          *                                 @c false, otherwise
153          */
154         void SetAutoReverseEnabled(bool enable);
155
156 private:
157         /**
158          * This is the default constructor for this class.
159          *
160          * @param[in]           rhs             A pointer to the Object instance which contains this instance.
161          */
162         _VisualElementAnimationTiming(const _VisualElementAnimationTiming& rhs);
163         _VisualElementAnimationTiming& operator =(const _VisualElementAnimationTiming& rhs);
164
165 private:
166         long __duration;
167         long __offset;
168         long __delay;
169
170         long __repeatCount;
171
172         float __scale;
173
174         bool __autoReverse;
175 };              // _VisualElementAnimationTiming
176
177 }}}             // Tizen::Ui::Animations
178
179 #endif // _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_TIMING_H_
180