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 FUiAnim_NativeLayer.h
20 * @brief This is the header file for the _NativeLayer class.
22 * This header file contains the declarations of the _NativeLayer class.
25 #ifndef _FUI_ANIM_INTERNAL_INATIVE_LAYER_H_
26 #define _FUI_ANIM_INTERNAL_INATIVE_LAYER_H_
28 #include <FUi_Types.h>
29 #include <FGrpFloatRectangle.h>
32 namespace Tizen { namespace Ui { namespace Animations
34 class _RootVisualElement;
37 class _OSP_EXPORT_ _NativeLayer
45 virtual ~_NativeLayer(void);
48 * Factory method of the native layer.
51 * @return instance of the native layer.
52 * @remarks This method make a instance of native layer by configuration.And call the Construct() method.
54 static _NativeLayer* CreateInstanceN(void);
58 * Initializes the native layer. It is designed with 2 phase-construction.
59 * This method invoke the OnConstructed method for constructing.
61 * @return instance of the native layer.
63 * @see OnConstructed()
65 result Construct(void);
67 _RootVisualElement* GetRootVisualElement(void) const;
70 void SetFlushNeeded(void)
75 void ResetFlushNeeded(void)
80 bool IsFlushNeeded(void) const
86 * Sets the position and the size of this instance.
90 * @return An error code
92 virtual result SetBounds(const Tizen::Graphics::FloatRectangle& bounds) = 0;
95 * Gets the position and the size of this instance.
99 * @return An instance of the FloatRectangle that represents the position of top-left corner,@n
100 * the width, and the height of this instance. It has relative coordinate space to the parent.
102 virtual Tizen::Graphics::FloatRectangle GetBounds(void) const = 0;
105 * Sets the show state of this instance.
109 * @return An error code
110 * @param[in] show Set to @c true if this instance needs to be shown,@n
112 * @see GetShowState()
114 virtual result SetShowState(bool show) = 0;
118 * Gets the show state of this instance.
121 * @return The show state of the %VisualElement instance.
122 * If an exception occurs , return @c false.
123 * @see SetShowState()
125 virtual bool GetShowState(void) const = 0;
129 * Flushes native layer on screen.
134 virtual void Flush(void) = 0;
138 virtual result OnConstructed(void) = 0;
140 * Binds a _RootVisualElement to the native layer. This method should configure the _RootVisualElement.
143 * @return error code.
145 virtual result Configure(_RootVisualElement& rootElement) = 0;
157 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
162 _NativeLayer(const _NativeLayer& rhs);
165 * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
170 _NativeLayer& operator =(const _NativeLayer& rhs);
173 _RootVisualElement* _pRootVisualElement;
178 friend class _RootVisualElement;
182 }}} //namespace Tizen { namespace Ui { namespace Animations
184 #endif //_FUI_ANIM_INTERNAL_INATIVE_LAYER_H_