Merge "fix klocwork issue" into tizen_2.2
[platform/framework/native/uifw.git] / inc / FUiAnimIControlAnimatorDetailedEventListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0/
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        FUiAnimIControlAnimatorDetailedEventListener.h
20  * @brief       This is the header file for the %IControlAnimatorDetailedEventListener interface.
21  *
22  * This header file contains the declarations of the %IControlAnimatorDetailedEventListener interface.
23  */
24
25 #ifndef _FUI_ANIM_ICONTROL_ANIMATOR_DETAILED_EVENT_LISTENER_H_
26 #define _FUI_ANIM_ICONTROL_ANIMATOR_DETAILED_EVENT_LISTENER_H_
27
28 #include <FBaseTypes.h>
29 #include <FBaseObject.h>
30 #include <FBaseRtIEventListener.h>
31
32 #include <FUiAnimTypes.h>
33 #include <FUiAnimAnimationBase.h>
34
35 namespace Tizen { namespace Ui
36 {
37 class Control;
38 } }
39 namespace Tizen { namespace Ui { namespace Animations
40 {
41 class ControlAnimator;
42 } } }
43 namespace Tizen { namespace Ui { namespace Animations
44 {
45
46
47
48 /**
49  * @interface   IControlAnimatorDetailedEventListener
50  * @brief               This interface implements a detailed listener for animation events.
51  *
52  * @since               2.0
53  *
54  * The %IControlAnimatorDetailedEventListener interface is the listener interface for receiving detailed control animator events.
55  * The class that processes a detailed control animator event implements this interface, and the instance created with that class
56  * is registered with a UI control, using the ControlAnimator::AddControlAnimatorDetailedEventListener() method. When the detailed
57  * control animator event occurs, a method of that instance is invoked.
58  */
59 class _OSP_EXPORT_ IControlAnimatorDetailedEventListener
60         : virtual public Tizen::Base::Runtime::IEventListener
61 {
62 public:
63
64         /**
65          * This is the destructor for this class.
66          *
67          * @since       2.0
68          */
69         virtual ~IControlAnimatorDetailedEventListener(void) {}
70
71
72         /**
73          * Called when an animation starts.
74          *
75          * @since       2.0
76          *
77          * @param[in]   source                  The source of the event
78          * @param[in]   control                 The control @n
79          *                              The animation starts on this control.
80          * @param[in]   animTrigger             The animator trigger type of the control @n
81          *                              The animation event has occurred for the specified trigger type.
82          * @param[in]   animTarget              The animation target type @n
83          *                              The animation event has occurred for the specified animation target type. In the case of implicit animations,
84          *                                                              @c animTarget is @c ANIMATION_TARGET_NONE.
85          * @param[in]   pAnimation              The animation object @n
86          *                              The event occurs for this animation object. In the case of implicit animations (animations not defined by the
87          *                                                              application), @c pAnimation is @c null.
88          */
89         virtual void OnControlAnimationStarted(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control, Tizen::Ui::Animations::ControlAnimatorTriggerType animTrigger, Tizen::Ui::Animations::AnimationTargetType animTarget, Tizen::Ui::Animations::AnimationBase* pAnimation) = 0;
90
91
92         /**
93          * Called when an animation is repeated. @n
94          * This event occurs only when a user calls StartUserAnimation().
95          *
96          * @since       2.0
97          *
98          * @param[in]   source                  The source of the event
99          * @param[in]   control                 The control @n
100          *                              The animation is repeated on this control.
101          * @param[in]   animTrigger             The animator trigger type of the control @n
102          *                              The animation event has occurred for the specified trigger type.
103          * @param[in]   animTarget              The animation target type @n
104          *                              The animation event has occurred for the specified animation target type. In the case of implicit animations,
105          *                                                              @c animTarget is @c ANIMATION_TARGET_NONE.
106          * @param[in]   pAnimation              The animation object @n
107          *                              The event occurs for this animation object. In the case of implicit animations (animations not defined by the
108          *                                                              application), @c pAnimation is @c null.
109          * @param[in]   repeatCount             The current repeat count of the animation
110          */
111         virtual void OnControlAnimationRepeated(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control, Tizen::Ui::Animations::ControlAnimatorTriggerType animTrigger, Tizen::Ui::Animations::AnimationTargetType animTarget, Tizen::Ui::Animations::AnimationBase* pAnimation, int repeatCount) = 0;
112
113
114         /**
115          * Called when an animation finishes.
116          *
117          * @since       2.0
118          *
119          * @param[in]   source                  The source of the event
120          * @param[in]   control                 The control @n
121          *                              The animation with the specified trigger type has finished for this control.
122          * @param[in]   animTrigger             The animator trigger type of the control @n
123          *                              The animation event has occurred for the specified trigger type.
124          * @param[in]   animTarget              The animation target type @n
125          *                              The animation event has occurred for the specified animation target type. In the case of implicit animations,
126          *                                                              @c animTarget is @c ANIMATION_TARGET_NONE.
127          * @param[in]   pAnimation              The animation object @n
128          *                              The event occurs for this animation object. In the case of implicit animations (animations not defined by the
129          *                                                              application), @c pAnimation is @c null.
130          */
131         virtual void OnControlAnimationFinished(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control, Tizen::Ui::Animations::ControlAnimatorTriggerType animTrigger, Tizen::Ui::Animations::AnimationTargetType animTarget, Tizen::Ui::Animations::AnimationBase* pAnimation) = 0;
132
133
134         /**
135          * Called when an animation stops.
136          *
137          * @since       2.0
138          *
139          * @param[in]   source                  The source of the event
140          * @param[in]   control                 The control @n
141          *                              The animation with the specified trigger type has stopped for this control.
142          * @param[in]   animTrigger             The animator trigger type of the control @n
143          *                              The animation event has occurred for the specified trigger type.
144          * @param[in]   animTarget              The animation target type @n
145          *                              The animation event has occurred for the specified animation target type. In the case of implicit animations,
146          *                                                              @c animTarget is @c ANIMATION_TARGET_NONE.
147          * @param[in]   pAnimation              The animation object @n
148          *                              The event occurs for this animation object. In the case of implicit animations (animations not defined by the
149          *                                                              application), @c pAnimation is @c null.
150          */
151         virtual void OnControlAnimationStopped(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control, Tizen::Ui::Animations::ControlAnimatorTriggerType animTrigger, Tizen::Ui::Animations::AnimationTargetType animTarget, Tizen::Ui::Animations::AnimationBase* pAnimation) = 0;
152
153
154 protected:
155
156         //
157         // This method is for internal use only. Using this method can cause behavioral, security-related,
158         // and consistency-related issues in the application.
159         //
160         // This method is reserved and may change its name at any time without
161         // prior notice.
162         //
163         // @since  2.0
164         //
165         virtual void IControlAnimatorDetailedEventListener_Reserved1(void) { }
166
167
168         //
169         // This method is for internal use only. Using this method can cause behavioral, security-related,
170         // and consistency-related issues in the application.
171         //
172         // This method is reserved and may change its name at any time without
173         // prior notice.
174         //
175         // @since  2.0
176         //
177         virtual void IControlAnimatorDetailedEventListener_Reserved2(void) { }
178
179
180         //
181         // This method is for internal use only. Using this method can cause behavioral, security-related,
182         // and consistency-related issues in the application.
183         //
184         // This method is reserved and may change its name at any time without
185         // prior notice.
186         //
187         // @since  2.0
188         //
189         virtual void IControlAnimatorDetailedEventListener_Reserved3(void) { }
190 };              // IControlAnimatorDetailedEventListener
191
192
193 }}}             // Tizen::Ui::Animations
194
195 #endif // _FUI_ANIM_ICONTROL_ANIMATOR_DETAILED_EVENT_LISTENER_H_