2 * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __FBCONTEXT_VIEW_H__
18 #define __FBCONTEXT_VIEW_H__
21 class CContextView : public CBaseView {
23 struct SContextView* m;
25 enum content_app_type {
31 static void _lbl_start_slide(Evas_Object *lbl);
32 static void _btn_focused(void *data, Evas_Object *obj, void *ev);
33 static void _btn_unfocused(void *data, Evas_Object *obj, void *ev);
35 static bool _add_btn_label(Evas_Object *btn, const char *txt);
36 static bool _add_btn_icon(Evas_Object *btn, const char *icon);
37 static bool _add_btn_info(Evas_Object *btn, const char *icon, const char *txt);
38 static Evas_Object *_add_btnbox(Evas_Object *base);
39 static bool _get_context_details(CExtNameInfo *pInfo, char **path, char **title, char *subtitle, char *subtitle2);
40 static Evas_Object *_add_rltv_ctnt(Evas_Object *obj, const char *name, const char *icon);
41 static Evas_Object *_add_scroller(Evas_Object *base);
42 static Evas_Object *_add_table(Evas_Object *base);
43 static Evas_Object *_get_icon(Evas_Object *obj, CExtNameInfo *finfo);
44 static void _set_default_thumb(Evas_Object *img, int type);
45 static Evas_Object *_create_lbl(Evas_Object *ly, char *title);
47 void m_SetBtnDownFocus(Evas_Object *btn);
48 void m_SetLayoutFocusOrder(Evas_Object *btn);
49 Evas_Object *m_AddButton(Evas_Object *base);
50 bool m_AddTableContents(Evas_Object *table, Eina_List *list, enum content_app_type type);
52 bool m_CreateContentApps(Eina_List *list, enum content_app_type type);
53 bool m_CreateBtnsPart(void);
54 bool m_CreateInfoPart(void);
55 static void sm_CbKeyPressed(void *dt, Evas *e, Evas_Object *obj, void *ei);
58 virtual void t_OnShow(void);
59 virtual void t_OnHide(void);
62 CContextView(const char *szViewId) : CBaseView(szViewId), m(0) {}
63 virtual ~CContextView() {}
65 virtual bool Create(void *data);
66 virtual void Destroy(void);
67 virtual Evas_Object* Base(void);
71 #endif /*__FBCONTEXT_VIEW_H__*/