Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_IndicatorManager.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        FUiCtrl_IndicatorManager.h
19  * @brief       This is the header file for the _IndicatorManager class.
20  *
21  * This header file contains the declarations of the %_IndicatorManager class.
22  */
23
24 #ifndef _FUI_CTRL_INTERNAL_INDICATOR_MANAGER_H_
25 #define _FUI_CTRL_INTERNAL_INDICATOR_MANAGER_H_
26
27 namespace Tizen { namespace Ui {
28 class _Window;
29 }};
30
31 namespace Tizen { namespace Base { namespace Collection
32 {
33 template<class KeyType, class ValueType> class HashMapT;
34 }}}
35
36 namespace Tizen { namespace Ui { namespace Animations {
37 class VisualElementSurface;
38 }}};
39
40 namespace Tizen { namespace Ui { namespace Controls
41 {
42 class _Form;
43
44 typedef struct
45 {
46         Evas_Object* pPortraitEvasObject;
47         Evas_Object* pLandscapeEvasObject;
48         Tizen::Ui::Animations::VisualElementSurface* pPortraitSurface;
49         Tizen::Ui::Animations::VisualElementSurface* pLandscapeSurface;
50         bool portraitSurfaceUsed;
51         bool landscapeSurfaceUsed;
52         _Form* pForm;
53 } IndicatorSurface ;
54
55 enum _IndicatorOrientation
56 {
57         _INDICATOR_ORIENTATION_PORTRAIT,
58         _INDICATOR_ORIENTATION_LANDSCAPE
59 };
60
61 class _IndicatorManager
62 {
63 public:
64         static _IndicatorManager* GetInstance(void);
65         static void Initialize(void);
66         static void InitializeInstance(void);
67         static void ReleaseInstance(void);
68
69         Tizen::Ui::Animations::VisualElementSurface* GetSurface(_Window* pWindow, _IndicatorOrientation orientation, _Form* pForm) const;
70         result ReleaseSurface(_Window* pWindow, _IndicatorOrientation orientation, Tizen::Ui::Animations::VisualElementSurface* pSurface);
71
72         result AddWindow(_Window* pWindow);
73         result DeleteWindow(_Window* pWindow);
74         IndicatorSurface* MakeEvasSurfaceArrayN(_Window* pWindow);
75         bool IsFull(IndicatorSurface* pIndicatorSurfaceArray) const;
76
77         Evas_Object* GetEvasObject(_Window* pWindow, _Form* pForm, _IndicatorOrientation orientation)const;
78         Tizen::Graphics::Dimension GetIndicatorSize(_IndicatorOrientation orientation) const;
79
80 private:
81         ~_IndicatorManager(void);
82         _IndicatorManager(void);
83
84         _IndicatorManager(const _IndicatorManager& value);
85         _IndicatorManager& operator =(const _IndicatorManager& value);
86
87 private:
88         static _IndicatorManager* __pInstance;
89
90         Tizen::Base::Collection::HashMapT<Tizen::Ui::_Window*, IndicatorSurface*> __indicatorMap;
91 }; // _IndicatorManager
92
93 }}} // Tizen::Ui::Controls
94
95 #endif // _FUI_CTRL_INTERNAL_INDICATOR_MANAGER_H_