N_SE-47263 : reset touch cancel when indicator touch released/N_SE-51832 : fix checki...
[platform/framework/native/uifw.git] / inc / FUiAnimVisualElementSurface.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        FUiAnimVisualElementSurface.h
20  * @brief       This is the header file for the %VisualElementSurface class.
21  *
22  * This header file contains the declarations of the %VisualElementSurface class.
23  */
24
25 #ifndef _FUI_ANIM_VISUAL_ELEMENT_SURFACE_H_
26 #define _FUI_ANIM_VISUAL_ELEMENT_SURFACE_H_
27
28 #include <FOspConfig.h>
29 #include <FBaseObject.h>
30 #include <FGrpDimension.h>
31 #include <FGrpFloatDimension.h>
32
33 namespace Tizen { namespace Graphics
34 {
35         class BufferInfo;
36 }} // Tizen::Graphics
37
38 namespace Tizen { namespace Ui { namespace Animations
39 {
40
41 class DisplayContext;
42 class _VisualElementSurfaceImpl;
43
44 /**
45 * @class        VisualElementSurface
46 * @brief        This class provides methods to control %VisualElementSurface.
47 *
48 * @since        2.0
49 *
50 * The %VisualElementSurface class provides methods to control %VisualElementSurface.
51 */
52 class _OSP_EXPORT_ VisualElementSurface
53         : public Tizen::Base::Object
54 {
55 public:
56
57         /**
58          * This is the default constructor for this class.
59          *
60          * @since               2.0
61          */
62         VisualElementSurface(void);
63
64         /**
65          * This is the copy constructor for the %VisualElementSurface class.
66          *
67          * @since               2.0
68          *
69          * @param[in]   rhs                                     An instance of %VisualElementSurface
70          * @exception   E_SUCCESS                       The method is successful.
71          * @remarks     The specific error code can be accessed using the GetLastResult() method.
72          * @remarks     It does not perform a deep copy (shared with the source).
73          */
74         VisualElementSurface(const VisualElementSurface& rhs);
75
76         /**
77          * Assigns the value of the specified instance to the current instance of %VisualElementSurface.
78          *
79          * @since               2.0
80          *
81          * @param[in]   rhs                                     An instance of %VisualElementSurface
82          * @exception   E_SUCCESS                       The method is successful.
83          * @remarks     The specific error code can be accessed using the GetLastResult() method.
84          * @remarks     It does not perform a deep copy (shared with the source).
85          */
86         VisualElementSurface& operator =(const VisualElementSurface& rhs);
87
88         /**
89          * This is the default destructor for this class.
90          *
91          * @since               2.0
92          */
93         virtual ~VisualElementSurface(void);
94
95 public:
96
97         /**
98          * Initializes this instance of %VisualElementSurface with the specified parameters.
99          *
100          * @since               2.0
101          *
102          * @return              An error code
103          * @param[in]   displayContext          The display context of the window
104          * @param[in]   size                            The size of the %VisualElementSurface instance
105          * @exception   E_SUCCESS                       The method is successful.
106          * @exception   E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method.
107          * @exception   E_INVALID_ARG           The display context is invalid.
108          * @remarks             The width and height of the @c size parameter is the logical size and must be greater than @c 0.
109          * @remarks             If this condition is not satisfied, the E_OUT_OF_RANGE exception is returned.
110          * @see                 Tizen::Ui::Window::GetDisplayContext()
111          */
112         result Construct(const DisplayContext& displayContext, const Tizen::Graphics::Dimension& size);
113
114         /**
115          * Initializes this instance of %VisualElementSurface with the specified parameters.
116          *
117          * @since               2.1
118          *
119          * @return              An error code
120          * @param[in]   displayContext          The display context of the window
121          * @param[in]   size                            The size of the %VisualElementSurface instance
122          * @exception   E_SUCCESS                       The method is successful.
123          * @exception   E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method.
124          * @exception   E_INVALID_ARG           The display context is invalid.
125          * @remarks             The width and height of the @c size parameter is the logical size and must be greater than @c 0.
126          * @remarks             If this condition is not satisfied, the E_OUT_OF_RANGE exception is returned.
127          * @see                 Tizen::Ui::Window::GetDisplayContext()
128          */
129         result Construct(const DisplayContext& displayContext, const Tizen::Graphics::FloatDimension& size);
130
131         /**
132          * Gets the buffer-related information of the %VisualElementSurface instance.
133          *
134          * @since               2.0
135          *
136          * @return              An error code
137          * @param[out]  bufferInfo                      The buffer-related information of the surface
138          * @exception   E_SUCCESS                       The method is successful.
139          * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
140          */
141         result GetBufferInfo(Tizen::Graphics::BufferInfo& bufferInfo) const;
142
143         /**
144          * Gets the size of the %VisualElementSurface instance.
145          *
146          * @since               2.0
147          *
148          * @return              The size of the %VisualElementSurface instance
149          * @exception   E_SUCCESS                       The method is successful.
150          * @remarks     The specific error code can be accessed using the GetLastResult() method.
151          * @remarks             If an error occurs, this method returns Tizen::Graphics::Dimension(0, 0).
152          */
153         Tizen::Graphics::Dimension GetSize(void) const;
154
155         /**
156          * Gets the size of the %VisualElementSurface instance.
157          *
158          * @since               2.1
159          *
160          * @return              The size of the %VisualElementSurface instance
161          * @exception   E_SUCCESS                       The method is successful.
162          * @remarks     The specific error code can be accessed using the GetLastResult() method.
163          * @remarks             If an error occurs, this method returns Tizen::Graphics::Dimension(0, 0).
164          */
165
166         Tizen::Graphics::FloatDimension GetSizeF(void) const;
167
168         /**
169          * Compares the Tizen::Base::Object instance with the calling %VisualElementSurface instance for equivalence.
170          *
171          * @since               2.0
172          *
173          * @return              @c true if the specified instance share the content with the current instance, @n
174          *                              else @c false
175          * @param[in]   obj                                     The object to compare with the current instance
176          * @see                 GetHashCode()
177          */
178         virtual bool Equals(const Tizen::Base::Object& obj) const;
179
180         /**
181          * Gets the hash value of the current instance.
182          *
183          * @since               2.0
184          *
185          * @return              The hash value of the current instance
186          * @remarks     The hash code of a buffer depends only upon its remaining elements.
187          */
188         virtual int GetHashCode(void) const;
189
190
191 protected:
192         //
193         // This method is for internal use only. Using this method can cause behavioral, security-related,
194         // and consistency-related issues in the application.
195         //
196         //
197         // This method is reserved and may change its name at any time without prior notice.
198         //
199         // @since        2.0
200         //
201         virtual void VisualElementSurface_Reserved1(void) {}
202
203
204         //
205         // This method is for internal use only. Using this method can cause behavioral, security-related,
206         // and consistency-related issues in the application.
207         //
208         //
209         // This method is reserved and may change its name at any time without prior notice.
210         //
211         // @since        2.0
212         //
213         virtual void VisualElementSurface_Reserved2(void) {}
214
215
216         //
217         // This method is for internal use only. Using this method can cause behavioral, security-related,
218         // and consistency-related issues in the application.
219         //
220         //
221         // This method is reserved and may change its name at any time without prior notice.
222         //
223         // @since        2.0
224         //
225         virtual void VisualElementSurface_Reserved3(void) {}
226
227
228 private:
229
230         //
231         // This variable is for internal use only. Using this variable can cause behavioral, security-related,
232         // and consistency-related issues in the application.
233         //
234         /**
235          * @since  2.0
236          */
237         _VisualElementSurfaceImpl* __pVisualElementSurfaceImpl;
238
239         friend class _VisualElementSurfaceImpl;
240
241 };              // VisualElementSurface
242
243
244 }}}             // Tizen::Ui::Animations
245
246 #endif // _FUI_ANIM_VISUAL_ELEMENT_SURFACE_H_
247