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