Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUi_ControlImplManager.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  * @file        FUi_ControlImplManager.h
19  * @brief       This is the header file for the _ControlImplManager class.
20  *
21  * This header file contains the declarations of the %_ControlImplManager class.
22  */
23
24 #ifndef _FUI_INTERNAL_CONTROL_IMPL_MANAGER_H_
25 #define _FUI_INTERNAL_CONTROL_IMPL_MANAGER_H_
26
27 #include <FUiIOrientationEventListener.h>
28 #include "FUi_Types.h"
29
30 extern "C" {
31 _OSP_EXPORT_ result InitializeUiFramework(void);
32 _OSP_EXPORT_ void FinalizeUiFramework(void);
33 }
34
35 namespace Tizen { namespace Ui {
36
37 class _WindowImpl;
38 class _ControlImpl;
39
40 #if defined(MULTI_WINDOW)
41 class _ControlImpl;
42 #endif
43
44 class _ControlImplManager
45 {
46 public:
47         static void Initialize(void);
48         static void Release(void);
49         static _ControlImplManager* GetInstance(void);
50         static void InitInstance(void);
51
52         _WindowImpl* GetCurrentFrame(void) const;
53
54         void OnScreenRotated(int rotation);
55         OrientationStatus GetFormOrientationStatus(_ControlImpl *pControlImpl);
56
57 private:
58         void SetOrientationStatus(OrientationStatus orientationStatus);
59 #if !defined(MULTI_WINDOW)
60         static void RotateScreen(OrientationStatus orientationStatus);
61 #else
62         static void RotateScreen(_ControlImpl* pControlImpl, OrientationStatus orientationStatus);
63 #endif
64         OrientationStatus GetOrientationStatus(Orientation mode) const;
65
66 private:
67         _ControlImplManager(void);
68         _ControlImplManager(const _ControlImplManager& rhs);
69         _ControlImplManager& operator =(const _ControlImplManager& rhs);
70         ~_ControlImplManager(void);
71
72 private:
73         _WindowImpl* __pFrameImpl;
74         static _ControlImplManager* __pInstance;
75         friend class _OrientationAgent;
76 }; // _ControlImplManager
77
78 }} // Tizen::Ui
79
80 #endif // _FUI_INTERNAL_CONTROL_IMPL_MANAGER_H_