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 FUiAnimVisualElementSurface.h
20 * @brief This is the header file for the %VisualElementSurface class.
22 * This header file contains the declarations of the %VisualElementSurface class.
25 #ifndef _FUI_ANIM_VISUAL_ELEMENT_SURFACE_H_
26 #define _FUI_ANIM_VISUAL_ELEMENT_SURFACE_H_
28 #include <FOspConfig.h>
29 #include <FBaseObject.h>
30 #include <FGrpDimension.h>
31 #include <FGrpFloatDimension.h>
33 namespace Tizen { namespace Graphics
38 namespace Tizen { namespace Ui { namespace Animations
42 class _VisualElementSurfaceImpl;
45 * @class VisualElementSurface
46 * @brief This class provides methods to control %VisualElementSurface.
50 * The %VisualElementSurface class provides methods to control %VisualElementSurface.
52 class _OSP_EXPORT_ VisualElementSurface
53 : public Tizen::Base::Object
58 * This is the default constructor for this class.
62 VisualElementSurface(void);
65 * This is the copy constructor for the %VisualElementSurface class.
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).
74 VisualElementSurface(const VisualElementSurface& rhs);
77 * Assigns the value of the specified instance to the current instance of %VisualElementSurface.
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).
86 VisualElementSurface& operator =(const VisualElementSurface& rhs);
89 * This is the default destructor for this class.
93 virtual ~VisualElementSurface(void);
98 * Initializes this instance of %VisualElementSurface with the specified parameters.
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()
112 result Construct(const DisplayContext& displayContext, const Tizen::Graphics::Dimension& size);
115 * Initializes this instance of %VisualElementSurface with the specified parameters.
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()
129 result Construct(const DisplayContext& displayContext, const Tizen::Graphics::FloatDimension& size);
132 * Gets the buffer-related information of the %VisualElementSurface instance.
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.
141 result GetBufferInfo(Tizen::Graphics::BufferInfo& bufferInfo) const;
144 * Gets the size of the %VisualElementSurface instance.
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).
153 Tizen::Graphics::Dimension GetSize(void) const;
156 * Gets the size of the %VisualElementSurface instance.
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).
166 Tizen::Graphics::FloatDimension GetSizeF(void) const;
169 * Compares the Tizen::Base::Object instance with the calling %VisualElementSurface instance for equivalence.
173 * @return @c true if the specified instance share the content with the current instance, @n
175 * @param[in] obj The object to compare with the current instance
178 virtual bool Equals(const Tizen::Base::Object& obj) const;
181 * Gets the hash value of the current instance.
185 * @return The hash value of the current instance
186 * @remarks The hash code of a buffer depends only upon its remaining elements.
188 virtual int GetHashCode(void) const;
193 // This method is for internal use only. Using this method can cause behavioral, security-related,
194 // and consistency-related issues in the application.
197 // This method is reserved and may change its name at any time without prior notice.
201 virtual void VisualElementSurface_Reserved1(void) {}
205 // This method is for internal use only. Using this method can cause behavioral, security-related,
206 // and consistency-related issues in the application.
209 // This method is reserved and may change its name at any time without prior notice.
213 virtual void VisualElementSurface_Reserved2(void) {}
217 // This method is for internal use only. Using this method can cause behavioral, security-related,
218 // and consistency-related issues in the application.
221 // This method is reserved and may change its name at any time without prior notice.
225 virtual void VisualElementSurface_Reserved3(void) {}
231 // This variable is for internal use only. Using this variable can cause behavioral, security-related,
232 // and consistency-related issues in the application.
237 _VisualElementSurfaceImpl* __pVisualElementSurfaceImpl;
239 friend class _VisualElementSurfaceImpl;
241 }; // VisualElementSurface
244 }}} // Tizen::Ui::Animations
246 #endif // _FUI_ANIM_VISUAL_ELEMENT_SURFACE_H_