2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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 FUiAnimIVisualElementContentProvider.h
20 * @brief This is the header file for the %IVisualElementContentProvider interface.
22 * This header file contains the declarations of the %IVisualElementContentProvider interface.
25 #ifndef _FUI_ANIM_IVISUAL_ELEMENT_CONTENT_PROVIDER_H_
26 #define _FUI_ANIM_IVISUAL_ELEMENT_CONTENT_PROVIDER_H_
28 #include <FOspConfig.h>
29 #include <FUiAnimTypes.h>
31 namespace Tizen { namespace Graphics {
36 namespace Tizen { namespace Ui { namespace Animations
42 * @interface IVisualElementContentProvider
43 * @brief This interface customizes content of VisualElement.
47 * The %IVisualElementContentProvider interface is the listener interface for providing content and information on it. The class that needs to customize content must implement this interface, and
48 * use the VisualElement::SetContentProvider() method to register to the VisualElement.
50 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/visualelement_content.htm">Content Provider</a>.
53 class _OSP_EXPORT_ IVisualElementContentProvider
58 * This is the destructor for this class.
62 virtual ~IVisualElementContentProvider(void) {}
66 * %PrepareDraw() is invoked by UI framework before DrawContent() is called.
67 * If this method returns @c true, VisualElement can call the %DrawContent() method.
71 * @return @c true if DrawContent() can be called, @n
73 * @param[in] target An instance of VisualElement to check
75 virtual bool PrepareDraw(Tizen::Ui::Animations::VisualElement& target) = 0;
79 * Fills content in the given canvas.
83 * @param[in] target An instance of VisualElement to draw
84 * @param[in] canvas A graphic canvas for drawing
85 * @see VisualElement::OnDraw()
86 * @see VisualElement::InvalidateRectangle()
88 virtual void DrawContent(Tizen::Ui::Animations::VisualElement& target, Tizen::Graphics::Canvas& canvas) = 0;
92 * The %HitTest() method is called by VisualElement::GetChildAt(). @n
93 * The %GetChildAt() method traverses through a list of all children, and performs a hit test search at the @c point using this method.
94 * You can modify hit test search result by overriding this method.
98 * @return The hit test result
99 * @param[in] target An instance of VisualElement to test
100 * @param[in] point The position of the source to check
101 * @remarks Hit test results must be one of the following: @n
102 * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_NOWHERE
103 * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_MATCH
104 * @see VisualElement::GetChildAt()
106 virtual HitTestResult HitTest(Tizen::Ui::Animations::VisualElement& target, const Tizen::Graphics::FloatPoint& point) = 0;
110 // Reserved virtual methods for later extension.
112 // This method is for internal use only. Using this method can cause behavioral, security-related,
113 // and consistency-related issues in the application.
116 // This method is reserved and may change its name at any time without prior notice.
120 virtual void IVisualElementContentProvider_Reserved1(void) {}
123 // Reserved virtual methods for later extension.
125 // This method is for internal use only. Using this method can cause behavioral, security-related,
126 // and consistency-related issues in the application.
129 // This method is reserved and may change its name at any time without prior notice.
133 virtual void IVisualElementContentProvider_Reserved2(void) {}
136 // Reserved virtual methods for later extension.
138 // This method is for internal use only. Using this method can cause behavioral, security-related,
139 // and consistency-related issues in the application.
142 // This method is reserved and may change its name at any time without prior notice.
146 virtual void IVisualElementContentProvider_Reserved3(void) {}
149 // Reserved virtual methods for later extension.
151 // This method is for internal use only. Using this method can cause behavioral, security-related,
152 // and consistency-related issues in the application.
155 // This method is reserved and may change its name at any time without prior notice.
159 virtual void IVisualElementContentProvider_Reserved4(void) {}
162 // Reserved virtual methods for later extension.
164 // This method is for internal use only. Using this method can cause behavioral, security-related,
165 // and consistency-related issues in the application.
168 // This method is reserved and may change its name at any time without prior notice.
172 virtual void IVisualElementContentProvider_Reserved5(void) {}
173 }; // IVisualElementContentProvider
176 }}} // Tizen::Ui::Animations
178 #endif //_FUI_ANIM_IVISUAL_ELEMENT_CONTENT_PROVIDER_H_