43b1d4f4fc650c9f324a9b82a759d07c32804180
[platform/framework/native/uifw.git] / src / ui / inc / FUiCtrl_Indicator.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  * @file                FUiCtrl_Indicator.h
19  * @brief               This is the header file for the %_Indicator class.
20  *
21  * This header file contains the declarations of the %_Indicator class.
22  */
23 #ifndef _FUI_CTRL_INTERNAL_INDICATOR_H_
24 #define _FUI_CTRL_INTERNAL_INDICATOR_H_
25
26 #include <FBaseRtTimer.h>
27 #include "FUi_Control.h"
28 #include "FUi_EcoreEvas.h"
29 #include "FUiAnim_ControlVisualElement.h"
30
31 namespace Tizen { namespace Ui { namespace Animations
32 {
33 class VisualElementSurface;
34 }}}
35
36 namespace Tizen { namespace Ui
37 {
38 class _Control;
39 }}
40
41 namespace Tizen { namespace Ui { namespace Controls
42 {
43
44 class _Indicator
45         : public Tizen::Ui::Animations::_ControlVisualElement
46         , public Tizen::Base::Runtime::ITimerEventListener
47 {
48 public:
49                 _Indicator(void);
50                 virtual ~_Indicator(void);
51
52                 static _Indicator* CreateIndicator(void);
53
54                 result SetIndicatorShowState(bool state);
55                 result SetIndicatorAutoHide(bool autohide);
56                 result SetIndicatorOpacity(_IndicatorOpacity opacity);
57                 bool GetIndicatorShowState(void) const;
58                 _IndicatorOpacity GetIndicatorOpacity(void) const;
59                 bool GetIndicatorAutoHide(void) const;
60                 result AddIndicatorObject(_Control* pControl, _Window* pWindow);
61                 result DeleteIndicatorObject(void);
62                 result ChangeCurrentVisualElement(Tizen::Ui::Animations::_VisualElement* pVisualElement);
63
64                 result SetNotificationTrayOpenEnabled(bool enable);
65                 bool IsNotificationTrayOpenEnabled(void) const;
66
67                 Tizen::Graphics::Rectangle GetIndicatorBounds(void) const;
68                 Tizen::Graphics::FloatRectangle GetIndicatorBoundsF(void) const;
69
70                 void OnChangeLayout(_ControlOrientation orientation);
71                 result OnAttachedToMainTree(void);
72                 virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
73                 static void OnDisconnected(Ecore_Evas *pEe);
74                 static void OnMessageHandle(Ecore_Evas *pEe, int msgDomain, int msgId, void *data, int size);
75
76 private:
77                 _Indicator(const _Indicator& value);
78                 _Indicator& operator =(const _Indicator& value);
79
80 private:
81                 Evas_Object* __pPortraitIndicatorEvasObject;
82                 Evas_Object* __pLandscapeIndicatorEvasObject;
83                 Tizen::Base::Runtime::Timer* __pConnectionTimer;
84                 Tizen::Ui::Animations::_VisualElement* __pPortraitVisualElement;
85                 Tizen::Ui::Animations::_VisualElement* __pLandscapeVisualElement;
86                 Tizen::Ui::Animations::_VisualElement* __pCurrentVisualElement;
87                 _Window* __pWindow;
88                 bool __showstate;
89                 bool __autohide;
90                 _IndicatorOpacity __opacity;
91                 Tizen::Ui::_ControlOrientation __orientation;
92
93 }; // _Indicator
94
95 }}} // Tizen::Ui::Controls
96
97 #endif // _FUI_CTRL_INTERNAL_INDICATOR_H_