2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0/
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 FUiAnimIVisualElementEventListener.h
20 * @brief This is the header file for the %IVisualElementEventListener interface.
22 * This header file contains the declarations of the %IVisualElementEventListener interface.
25 #ifndef _FUIANIM_IVISUAL_ELEMENT_EVENT_LISTENER_H_
26 #define _FUIANIM_IVISUAL_ELEMENT_EVENT_LISTENER_H_
29 #include <FGrpFloatRectangle.h>
30 #include <FGrpFloatMatrix4.h>
32 namespace Tizen { namespace Ui { namespace Animations
38 * @interface IVisualElementEventListener
39 * @brief This interface implements the event listener for the events generated by %VisualElement.
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.
46 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/visualelement_eventhandling.htm">Event Handling</a>.
49 class _OSP_EXPORT_ IVisualElementEventListener
50 : public Tizen::Base::Runtime::IEventListener
55 * This is the destructor for this class.
59 virtual ~IVisualElementEventListener(void) {}
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.
70 * @param[in] parent The parent instance
71 * @param[in] child The child instance
72 * @see VisualElement::AttachChild()
73 * @see VisualElement::InsertChild()
75 virtual void OnChildAttached(Tizen::Ui::Animations::VisualElement& parent, Tizen::Ui::Animations::VisualElement& child) = 0;
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.
85 * @param[in] parent The parent instance
86 * @param[in] child The child instance
87 * @see VisualElement::DetachChild()
89 virtual void OnChildDetached(Tizen::Ui::Animations::VisualElement& parent, Tizen::Ui::Animations::VisualElement& child) = 0;
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.
99 * @param[in] child The child instance
100 * @param[in] parent The parent instance
101 * @see VisualElement::AttachChild()
102 * @see VisualElement::InsertChild()
104 virtual void OnAttached(Tizen::Ui::Animations::VisualElement& child, Tizen::Ui::Animations::VisualElement& parent) = 0;
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.
114 * @param[in] child The child instance
115 * @param[in] parent The parent instance
116 * @see VisualElement::DetachChild()
118 virtual void OnDetached(Tizen::Ui::Animations::VisualElement& child, Tizen::Ui::Animations::VisualElement& parent) = 0;
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.
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.
133 virtual result OnTransformChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatMatrix4& newTransform) = 0;
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.
143 * @param[in] source The VisualElement change applied
144 * @param[in] previousTransform The previous transform matrix
146 virtual void OnTransformChanged(Tizen::Ui::Animations::VisualElement& source, const Tizen::Graphics::FloatMatrix4& previousTransform) = 0;
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.
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.
161 virtual result OnChildrenTransformChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatMatrix4& newTransform) = 0;
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.
171 * @param[in] source The VisualElement change applied
172 * @param[in] previousTransform The previous transform matrix
174 virtual void OnChildrenTransformChanged(Tizen::Ui::Animations::VisualElement& source, const Tizen::Graphics::FloatMatrix4& previousTransform) = 0;
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.
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.
189 virtual result OnBoundsChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatRectangle& newBounds) = 0;
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.
199 * @param[in] source The VisualElement change applied
200 * @param[in] previousBounds The previous bounds
202 virtual void OnBoundsChanged(Tizen::Ui::Animations::VisualElement& source, const Tizen::Graphics::FloatRectangle& previousBounds) = 0;
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.
212 * @param[in] source An instance whose show state is changed
213 * @param[in] previousShowState The previous show state
215 virtual void OnShowStateChanged(Tizen::Ui::Animations::VisualElement& source, bool previousShowState) = 0;
219 // Reserved virtual methods for later extension.
221 // This method is for internal use only. Using this method can cause behavioral, security-related,
222 // and consistency-related issues in the application.
225 // This method is reserved and may change its name at any time without prior notice.
229 virtual void IVisualElementEventListener_Reserved1(void) {}
233 // This method is for internal use only. Using this method can cause behavioral, security-related,
234 // and consistency-related issues in the application.
237 // This method is reserved and may change its name at any time without prior notice.
241 virtual void IVisualElementEventListener_Reserved2(void) {}
245 // This method is for internal use only. Using this method can cause behavioral, security-related,
246 // and consistency-related issues in the application.
249 // This method is reserved and may change its name at any time without prior notice.
253 virtual void IVisualElementEventListener_Reserved3(void) {}
257 // This method is for internal use only. Using this method can cause behavioral, security-related,
258 // and consistency-related issues in the application.
261 // This method is reserved and may change its name at any time without prior notice.
265 virtual void IVisualElementEventListener_Reserved4(void) {}
269 // This method is for internal use only. Using this method can cause behavioral, security-related,
270 // and consistency-related issues in the application.
273 // This method is reserved and may change its name at any time without prior notice.
277 virtual void IVisualElementEventListener_Reserved5(void) {}
278 }; // IVisualElementEventListener
281 }}} // Tizen::Ui::Animations
283 #endif //_FUI_ANIM_IVISUAL_ELEMENT_EVENT_LISTENER_H_