e33fe15be32bdaafa9e712888bf4813c371dcbfd
[profile/tv/apps/native/source.git] / include / view / nearby_layout.h
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __NEARBY_LAYOUT_H__
18 #define __NEARBY_LAYOUT_H__
19
20 class CNearbyLayout : public CBaseLayout, CListenerMgr,
21         IKeyDownListener, IMouseMoveListener, IFocusedListener {
22
23 private:
24         struct SNearbyLayout *m;
25
26 protected:
27         virtual void t_OnShow(void);
28         virtual void t_OnHide(void);
29
30 private:
31         static Eina_Bool sm_CbTimerDelItem(void *data);
32         void m_TimerDelItem(void);
33
34         void m_LaunchSettingApp(void);
35         void m_AddSetNetworkButton(void);
36         void m_AddNoSrcUtility(void);
37         void m_DelNoSrcUtility(void);
38         void m_DrawNoSrcUtility(void);
39
40         void m_DrawNoContentArea(void);
41         void m_DrawContentArea(void);
42
43         Evas_Object *m_DrawGengrid(Evas_Object *layout);
44
45 public:
46         CNearbyLayout(const char *pLayoutId) : CBaseLayout(pLayoutId),
47                 IKeyDownListener(this), IMouseMoveListener(this),
48                 IFocusedListener(this),  m(0) {}
49
50         ~CNearbyLayout() {}
51
52         bool Create(CLayoutMgr *mgr, void *data);
53         virtual void Destroy(void);
54
55         void Update(void *data, enum update_ui type);
56
57 public:
58         void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev);
59         void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev);
60         void OnFocused(int id, Evas_Object *obj, Elm_Object_Item *item);
61 };
62
63 #endif /* __NEARBY_LAYOUT_H__ */