2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0/
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_DisplayManager.h
20 * @brief This is the header file for the _DisplayManager class.
22 * This header file contains the declarations of the _DisplayManager class.
25 #ifndef _FUI_ANIM_INTERNAL_DISPLAY_MANAGER_H_
26 #define _FUI_ANIM_INTERNAL_DISPLAY_MANAGER_H_
28 #include <FBaseColArrayList.h>
33 #define VE_VSYNC_UPDATE
35 namespace Tizen { namespace Ui { namespace Animations
38 class _RootVisualElement;
40 class _OSP_EXPORT_ _DisplayManager
43 static _DisplayManager* GetInstance(void)
45 return _DisplayManager::__pInstance;
48 static result CreateInstance(void);
49 static result ReleaseInstance(void);
50 static bool __wakeUpEventAdded;
52 // For restoring gl context
53 typedef void (*RestoreContextCallback)(void);
54 static void SetRestoreContextCallback(RestoreContextCallback pRestoreContextCallback);
55 static void RestoreContext(void);
57 _RootVisualElement* CreateRoot(void);
59 result DestroyRoot(_RootVisualElement& root);
61 result RegisterRoot(_RootVisualElement& root);
63 result UnregisterRoot(_RootVisualElement& root);
65 int GetRootCount(void) const;
67 _RootVisualElement* GetRoot(int index) const;
69 void AddWakeUpEvent(void);
70 void RemoveWakeUpEvent(void);
72 bool Render(_RootVisualElement& root);
73 result PostRender(_RootVisualElement& root);
78 _DisplayManager(void);
79 virtual ~_DisplayManager(void);
82 Tizen::Base::Collection::ArrayList __roots;
84 static int __eventType;
85 static void* __pWakeUpEventHandler;
86 static _DisplayManager* __pInstance;
87 static RestoreContextCallback __pRestoreContextCallback;
90 }}} //namespace Tizen { namespace Ui { namespace Animations
92 #endif //_FUI_ANIM_INTERNAL_DISPLAY_MANAGER_H_