Fix to adjust the position of the partial Frame
[platform/framework/native/uifw.git] / inc / FUiAnimIVisualElementContentProvider.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        FUiAnimIVisualElementContentProvider.h
20  * @brief       This is the header file for the %IVisualElementContentProvider interface.
21  *
22  * This header file contains the declarations of the %IVisualElementContentProvider interface.
23  */
24
25 #ifndef _FUI_ANIM_IVISUAL_ELEMENT_CONTENT_PROVIDER_H_
26 #define _FUI_ANIM_IVISUAL_ELEMENT_CONTENT_PROVIDER_H_
27
28 #include <FOspConfig.h>
29 #include <FUiAnimTypes.h>
30
31 namespace Tizen { namespace Graphics {
32 class Canvas;
33 class FloatPoint;
34 }} // Tizen::Graphics
35
36 namespace Tizen { namespace Ui { namespace Animations
37 {
38 class VisualElement;
39
40
41 /**
42  * @interface           IVisualElementContentProvider
43  * @brief This interface customizes content of VisualElement.
44  *
45  * @since          2.0
46  *
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.
49  *
50  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/visualelement_content.htm">Content Provider</a>.
51  *
52  */
53 class _OSP_EXPORT_ IVisualElementContentProvider
54 {
55 public:
56
57         /**
58          * This is the destructor for this class.
59          *
60          * @since       2.0
61          */
62         virtual ~IVisualElementContentProvider(void) {}
63
64 public:
65         /**
66          * %PrepareDraw() is invoked by UI framework before DrawContent() is called.
67          * If this method returns @c true, VisualElement can call the %DrawContent() method.
68          *
69          * @since               2.0
70          *
71          * @return              @c true if DrawContent() can be called, @n
72      *              else @c false
73          * @param[in]   target                  An instance of VisualElement to check
74          */
75         virtual bool PrepareDraw(Tizen::Ui::Animations::VisualElement& target) = 0;
76
77
78         /**
79          * Fills content in the given canvas.
80          *
81          * @since               2.0
82          *
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()
87          */
88         virtual void DrawContent(Tizen::Ui::Animations::VisualElement& target, Tizen::Graphics::Canvas& canvas) = 0;
89
90
91         /**
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.
95          *
96          * @since               2.0
97          *
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()
105          */
106         virtual HitTestResult HitTest(Tizen::Ui::Animations::VisualElement& target, const Tizen::Graphics::FloatPoint& point) = 0;
107
108
109 protected:
110         // Reserved virtual methods for later extension.
111         //
112         // This method is for internal use only. Using this method can cause behavioral, security-related,
113         // and consistency-related issues in the application.
114         //
115         //
116         // This method is reserved and may change its name at any time without prior notice.
117         //
118         // @since        2.0
119         //
120         virtual void IVisualElementContentProvider_Reserved1(void) {}
121
122
123         // Reserved virtual methods for later extension.
124         //
125         // This method is for internal use only. Using this method can cause behavioral, security-related,
126         // and consistency-related issues in the application.
127         //
128         //
129         // This method is reserved and may change its name at any time without prior notice.
130         //
131         // @since        2.0
132         //
133         virtual void IVisualElementContentProvider_Reserved2(void) {}
134
135
136         // Reserved virtual methods for later extension.
137         //
138         // This method is for internal use only. Using this method can cause behavioral, security-related,
139         // and consistency-related issues in the application.
140         //
141         //
142         // This method is reserved and may change its name at any time without prior notice.
143         //
144         // @since        2.0
145         //
146         virtual void IVisualElementContentProvider_Reserved3(void) {}
147
148
149         // Reserved virtual methods for later extension.
150         //
151         // This method is for internal use only. Using this method can cause behavioral, security-related,
152         // and consistency-related issues in the application.
153         //
154         //
155         // This method is reserved and may change its name at any time without prior notice.
156         //
157         // @since        2.0
158         //
159         virtual void IVisualElementContentProvider_Reserved4(void) {}
160
161
162         // Reserved virtual methods for later extension.
163         //
164         // This method is for internal use only. Using this method can cause behavioral, security-related,
165         // and consistency-related issues in the application.
166         //
167         //
168         // This method is reserved and may change its name at any time without prior notice.
169         //
170         // @since        2.0
171         //
172         virtual void IVisualElementContentProvider_Reserved5(void) {}
173 };              // IVisualElementContentProvider
174
175
176 }}}             // Tizen::Ui::Animations
177
178 #endif //_FUI_ANIM_IVISUAL_ELEMENT_CONTENT_PROVIDER_H_