Merge "Unchecked GetCharacter func when index is over string length" into tizen_2.2
[platform/framework/native/uifw.git] / inc / FUiAnimIVisualElementEventListener.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        FUiAnimIVisualElementEventListener.h
20  * @brief       This is the header file for the %IVisualElementEventListener interface.
21  *
22  * This header file contains the declarations of the %IVisualElementEventListener interface.
23  */
24
25 #ifndef _FUIANIM_IVISUAL_ELEMENT_EVENT_LISTENER_H_
26 #define _FUIANIM_IVISUAL_ELEMENT_EVENT_LISTENER_H_
27
28 #include <FBase.h>
29 #include <FGrpFloatRectangle.h>
30 #include <FGrpFloatMatrix4.h>
31
32 namespace Tizen { namespace Ui { namespace Animations
33 {
34
35 class VisualElement;
36
37 /**
38 * @interface          IVisualElementEventListener
39 * @brief This interface implements the event listener for the events generated by %VisualElement.
40 *
41 * @since          2.0
42 *
43 * The %IVisualElementEventListener interface is for receiving events on status change of VisualElement. The class that processes a status change event of %VisualElement
44 * implements this interface, and the instance created with that class is registered with %VisualElement, using the VisualElement::SetVisualElementEventListener() method.
45 *
46 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/visualelement_eventhandling.htm">Event Handling</a>.
47 *
48 */
49 class _OSP_EXPORT_ IVisualElementEventListener
50         : public Tizen::Base::Runtime::IEventListener
51 {
52 public:
53
54         /**
55          * This is the destructor for this class.
56          *
57          * @since       2.0
58          */
59         virtual ~IVisualElementEventListener(void) {}
60
61 public:
62
63         /**
64          * Called when the child is attached to VisualElement. @n
65          * Overrides the %OnChildAttached() method to provide user-specific code just after the child is attached to the %VisualElement.
66          * This method is invoked when @c child is attached to @c source by @c AttachChild, @c InsertChild, @c ChangeZOder.
67          *
68          * @since               2.0
69          *
70          * @param[in]   parent          The parent instance
71          * @param[in]   child           The child instance
72          * @see                 VisualElement::AttachChild()
73          * @see                 VisualElement::InsertChild()
74          */
75         virtual void OnChildAttached(Tizen::Ui::Animations::VisualElement& parent, Tizen::Ui::Animations::VisualElement& child) = 0;
76
77
78         /**
79          * Called when the child is detached to VisualElement. @n
80          * Overrides the %OnChildDetached() method to provide user-specific code just after the child is detached from the %VisualElement.
81          * This method is invoked when @c child is detached from @c source by @c DetachChild, @c InsertChild, or @c ChangeZOder.
82          *
83          * @since               2.0
84          *
85          * @param[in]   parent          The parent instance
86          * @param[in]   child           The child instance
87          * @see                 VisualElement::DetachChild()
88          */
89         virtual void OnChildDetached(Tizen::Ui::Animations::VisualElement& parent, Tizen::Ui::Animations::VisualElement& child) = 0;
90
91
92         /**
93          * Called when VisualElement is attached to the parent. @n
94          * Overrides the %OnAttached() method to provide user-specific code just after the %VisualElement is attached to the parent.
95          * This method is invoked when @c source is attached to @c parent by @c AttachChild, @c InsertChild, @c ChangeZOder.
96          *
97          * @since               2.0
98          *
99          * @param[in]   child           The child instance
100          * @param[in]   parent          The parent instance
101          * @see                 VisualElement::AttachChild()
102          * @see                 VisualElement::InsertChild()
103          */
104         virtual void OnAttached(Tizen::Ui::Animations::VisualElement& child, Tizen::Ui::Animations::VisualElement& parent) = 0;
105
106
107         /**
108          * Called when VisualElement is detached to the parent. @n
109          * Overrides the %OnDetached() method to provide user-specific code just after the %VisualElement is detached from the parent.
110          * This method is invoked when @c source is detached from @c parent by @c DetachChild, @c InsertChild, or @c ChangeZOder.
111          *
112          * @since               2.0
113          *
114          * @param[in]   child           The child instance
115          * @param[in]   parent          The parent instance
116          * @see                 VisualElement::DetachChild()
117          */
118         virtual void OnDetached(Tizen::Ui::Animations::VisualElement& child, Tizen::Ui::Animations::VisualElement& parent) = 0;
119
120
121         /**
122          * Called when the transform matrix is about to be changed. @n
123          * Overrides the %OnTransformChanging() method to provide the user-specific code before the transform matrix is changed.
124          * This method is invoked when the transform matrix of @c source is about to be changed by invoking @c SetTransformMatrix.
125          *
126          * @since               2.0
127          *
128          * @return              An error code
129          * @param[in]   source                  The VisualElement to change
130          * @param[in,out]       newTransform    The new transform matrix
131          * @remarks             If this method returns @c E_SUCCESS, @c source will be applied with @c newTransform matrix, else will be cancelled.
132          */
133         virtual result OnTransformChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatMatrix4& newTransform) = 0;
134
135
136         /**
137          * Called when the transform matrix is changed. @n
138          * Overrides the %OnTransformChanged() method to provide the user-specific code just after the transform matrix is changed.
139          * This method is invoked when the transform matrix of @c source is changed by invoking @c SetTransformMatrix.
140          *
141          * @since               2.0
142          *
143          * @param[in]   source                  The VisualElement change applied
144          * @param[in]   previousTransform       The previous transform matrix
145          */
146         virtual void OnTransformChanged(Tizen::Ui::Animations::VisualElement& source, const Tizen::Graphics::FloatMatrix4& previousTransform) = 0;
147
148
149         /**
150          * Called when the children transform matrix is about to be changed. @n
151          * Overrides the %OnChildrenTransformChanging() method to provide user-specific code before the children transform matrix is changed.
152          * This method is invoked when the children transform matrix of @c source is about to be changed by invoking @c SetChildrenTransformMatrix.
153          *
154          * @since               2.0
155          *
156          * @return              An error code
157          * @param[in]   source                  The VisualElement to change
158          * @param[in,out]       newTransform    The new transform matrix
159          * @remarks             If this method returns @c E_SUCCESS, @c source will be applied with @c newTransform matrix, else will be cancelled.
160          */
161         virtual result OnChildrenTransformChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatMatrix4& newTransform) = 0;
162
163
164         /**
165          * Called when the children transform matrix is changed. @n
166          * Overrides the %OnChildrenTransformChanged() method to provide user-specific code just after the children transform matrix is changed.
167          * This method is invoked when the children transform matrix of @c source is changed by invoking @c SetChildrenTransformMatrix.
168          *
169          * @since               2.0
170          *
171          * @param[in]   source                  The VisualElement change applied
172          * @param[in]   previousTransform       The previous transform matrix
173          */
174         virtual void OnChildrenTransformChanged(Tizen::Ui::Animations::VisualElement& source, const Tizen::Graphics::FloatMatrix4& previousTransform) = 0;
175
176
177         /**
178          * Called when the bounds are about to be changed. @n
179          * Overrides the %OnBoundsChanging() method to provide user-specific code before the bounds are changed.
180          * This method is invoked when the bounds @c source is about to be changed by invoking @c SetBounds.
181          *
182          * @since               2.0
183          *
184          * @return              An error code
185          * @param[in]   source                  The VisualElement to change
186          * @param[in,out]       newBounds               The new bounds
187          * @remarks             If this method does not return @c E_SUCCESS, @c source is not applied with @c newBounds rectangle.
188          */
189         virtual result OnBoundsChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatRectangle& newBounds) = 0;
190
191
192         /**
193          * Called when the bounds are changed. @n
194          * Overrides the %OnBoundsChanged() method to provide user-specific code just after the bounds are changed.
195          * This method is invoked when the bounds of @c source is changed by invoking @c SetBounds.
196          *
197          * @since               2.0
198          *
199          * @param[in]   source                  The VisualElement change applied
200          * @param[in]   previousBounds          The previous bounds
201          */
202         virtual void OnBoundsChanged(Tizen::Ui::Animations::VisualElement& source, const Tizen::Graphics::FloatRectangle& previousBounds) = 0;
203
204
205         /**
206          * Called when the show state is changed. @n
207          * Overrides the %OnShowStateChanged() method to provide user-specific code when the show state is changed.
208          * This method is invoked when the show state of @c source is changed by invoking @c SetShowState.
209          *
210          * @since               2.0
211          *
212          * @param[in]   source                  An instance whose show state is changed
213          * @param[in]   previousShowState       The previous show state
214          */
215         virtual void OnShowStateChanged(Tizen::Ui::Animations::VisualElement& source, bool previousShowState) = 0;
216
217
218 protected:
219         // Reserved virtual methods for later extension.
220         //
221         // This method is for internal use only. Using this method can cause behavioral, security-related,
222         // and consistency-related issues in the application.
223         //
224         //
225         // This method is reserved and may change its name at any time without prior notice.
226         //
227         // @since        2.0
228         //
229         virtual void IVisualElementEventListener_Reserved1(void) {}
230
231
232         //
233         // This method is for internal use only. Using this method can cause behavioral, security-related,
234         // and consistency-related issues in the application.
235         //
236         //
237         // This method is reserved and may change its name at any time without prior notice.
238         //
239         // @since        2.0
240         //
241         virtual void IVisualElementEventListener_Reserved2(void) {}
242
243
244         //
245         // This method is for internal use only. Using this method can cause behavioral, security-related,
246         // and consistency-related issues in the application.
247         //
248         //
249         // This method is reserved and may change its name at any time without prior notice.
250         //
251         // @since        2.0
252         //
253         virtual void IVisualElementEventListener_Reserved3(void) {}
254
255
256         //
257         // This method is for internal use only. Using this method can cause behavioral, security-related,
258         // and consistency-related issues in the application.
259         //
260         //
261         // This method is reserved and may change its name at any time without prior notice.
262         //
263         // @since        2.0
264         //
265         virtual void IVisualElementEventListener_Reserved4(void) {}
266
267
268         //
269         // This method is for internal use only. Using this method can cause behavioral, security-related,
270         // and consistency-related issues in the application.
271         //
272         //
273         // This method is reserved and may change its name at any time without prior notice.
274         //
275         // @since        2.0
276         //
277         virtual void IVisualElementEventListener_Reserved5(void) {}
278 };              // IVisualElementEventListener
279
280
281 }}}             // Tizen::Ui::Animations
282
283 #endif //_FUI_ANIM_IVISUAL_ELEMENT_EVENT_LISTENER_H_