Fork for IVI: mesa fixing
[profile/ivi/uifw.git] / src / ui / inc / FUiAnim_EflNode.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        FUiAnim_EflNode.h
20  * @brief       Header file of _EflNode class
21  *
22  * This file contains declarations _EflNode class.
23  */
24
25 #ifndef FUI_ANIM_INTERNAL_EFLNODE_H_
26 #define FUI_ANIM_INTERNAL_EFLNODE_H_
27
28 #include <Evas.h>
29 #include <FGrpFloatRectangle.h>
30 #include <FUiAnimVisualElement.h>
31 #include <FUiAnimVisualElementSurface.h>
32
33 #include "FUi_Colorf.h"
34 #include "FUiAnim_INativeNode.h"
35
36
37 namespace Tizen { namespace Ui { namespace Animations
38 {
39
40 class VisualElement;
41 class _VisualElementImpl;
42 class VisualElementSurface;
43 class _NativeLayer;
44
45 class _OSP_EXPORT_ _EflNode
46         : public _INativeNode
47 {
48 public:
49         _EflNode(void);
50         virtual ~_EflNode(void);
51
52         virtual result Construct(void);
53         virtual result RebuildIfNeeded(const _INativeNode& parent);
54
55 public:
56         virtual Handle GetGroupContainer(void) const;
57         virtual result InsertChild(_INativeNode& child, const _INativeNode* pReference, bool above);
58         virtual result RemoveChild(_INativeNode& child);
59         virtual result SetFlushNeeded(void);
60         virtual result Flush(void);
61         virtual result Reconfigure(VisualElementSurface* pSurface, _VisualElementImpl& element, bool surfaceOnly);
62         virtual VisualElementSurface* GetSurface(void) const;
63
64         Evas* GetEvas(void) const;
65
66         _Colorf GetBackgroundColor(void) const;
67         result SetBackgroundColor(const _Colorf& backgroundColor);
68
69         void AddNativeSmartObject(VisualElement& element, Evas_Object* pSmartObject);
70         void SetNativeObject(VisualElement& element, Evas_Object* pNativeObject);
71         void RemoveNativeObject(void);
72         Evas_Object* GetNativeObject(void) const;
73
74 private:
75         void AdjustEvasObjectOrder(void);
76         bool AdjustImageHolder(bool useHolder);
77
78         result ReConstruct(const Evas* pEvas);
79         result ReConstruct(const _NativeLayer& layer);
80
81         result Destruct(void);
82
83 private:
84         _EflNode(const _EflNode& rhs);              // no impl.
85         _EflNode& operator =(const _EflNode& rhs);  // no impl.
86
87 private:
88         VisualElementSurface* __pSurface;
89         VisualElementSurface* __pSharedSurface;
90         Evas* __pEvas;
91         Evas_Object* __pSmartObject;
92         Evas_Object* __pClipObject;
93         Evas_Object* __pRectangleObject;
94         Evas_Object* __pImageHolder;
95         Evas_Object* __pNativeSmartObject;
96         Evas_Map* __pMap;
97         bool __mapUsed;
98         VisualElement::RenderOperation __renderOperation;
99         bool __needEvasObjectSync;
100         Tizen::Graphics::FloatRectangle __realBounds;
101
102         _Colorf __backgroundColor;
103
104         _NativeLayer* __pLayer;
105
106         static Evas_Smart* __pStaticSmartClass;
107         static Evas_Smart* __pStaticSmartClassForImageHolder;
108
109         friend class _INativeNode;
110         friend class _VeDebug;
111         friend class _VisualElementImpl;
112         friend class _EflLayer;
113 };              // _EflNode
114
115
116 }}}             // Tizen::Ui::Animations
117
118 #endif //FUI_ANIM_INTERNAL_EFLNODE_H_