aa74c3cb46266dbee852cd2c3a56b4e16f417c30
[framework/osp/uifw.git] / src / ui / inc / FUiAnim_DisplayManager.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        FUiAnim_DisplayManager.h
20  * @brief       This is the header file for the _DisplayManager class.
21  *
22  * This header file contains the declarations of the _DisplayManager class.
23  */
24
25 #ifndef _FUI_ANIM_INTERNAL_DISPLAY_MANAGER_H_
26 #define _FUI_ANIM_INTERNAL_DISPLAY_MANAGER_H_
27
28 #include <FBaseColArrayList.h>
29
30 // Backend feature
31 #define VE_EFL
32 //#define VE_OPENGL
33 #define VE_VSYNC_UPDATE
34
35 namespace Tizen { namespace Ui { namespace Animations
36 {
37
38 class _RootVisualElement;
39
40 class _OSP_EXPORT_ _DisplayManager
41 {
42 public:
43         static _DisplayManager* GetInstance(void)
44         {
45                 return _DisplayManager::__pInstance;
46         }
47
48         static result CreateInstance(void);
49         static result ReleaseInstance(void);
50         static bool __wakeUpEventAdded;
51
52 public:
53         _RootVisualElement* CreateRoot(void);
54
55         result DestroyRoot(_RootVisualElement& root);
56
57         result RegisterRoot(_RootVisualElement& root);
58
59         result UnregisterRoot(_RootVisualElement& root);
60
61         int GetRootCount(void) const;
62
63         _RootVisualElement* GetRoot(int index) const;
64
65         void AddWakeUpEvent(void);
66         void RemoveWakeUpEvent(void);
67
68         bool Render(_RootVisualElement& root);
69         result PostRender(_RootVisualElement& root);
70         bool RenderAll(void);
71         result Flush(void);
72
73 private:
74         _DisplayManager(void);
75         virtual ~_DisplayManager(void);
76
77 private:
78         Tizen::Base::Collection::ArrayList __roots;
79
80         static int __eventType;
81         static void* __pWakeUpEventHandler;
82         static _DisplayManager* __pInstance;
83 }; // _DisplayManager
84
85 }}} //namespace Tizen { namespace Ui { namespace Animations
86
87 #endif //_FUI_ANIM_INTERNAL_DISPLAY_MANAGER_H_