tizen 2.3.1 release
[apps/home/settings.git] / setting-menuscreen / include / setting-menuscreen.h
1 /*
2  * setting
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
5  *
6  * Contact: MyoungJune Park <mj2004.park@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21 #ifndef __SETTING_MENUSCREEN_H__
22 #define __SETTING_MENUSCREEN_H__
23
24 #include <stdio.h>
25 #include <string.h>
26
27 #include <Elementary.h>
28
29 #include <glib-object.h>
30
31 #include <Eina.h>
32 #include <ail.h>
33 #include <aul.h>
34
35 #include <setting-common-draw-widget.h>
36 #include <setting-common-view.h>
37
38 #define SETTING_PW_STR "16777216"
39 #define SETTING_THEME_LIVE_MAGAZINE     "org.tizen.live-magazine"
40 #define SETTING_THEME_CLUSTER_HOME              "org.tizen.cluster-home"
41
42 #define SETTING_MENUSCREEN_FOLDER "/opt/share/install-info/"
43 #define SETTING_MENUSCREEN_FILE_EXTENSION "desktop"
44 #define SETTING_MENUSCREEN_INDEX_NAME "name"
45
46 #define SETTING_MENUSCREEN_SELECTED_PACKAGE_VCONF_KEY VCONFKEY_SETAPPL_SELECTED_PACKAGE_NAME
47
48 #define SETTING_MENUSCREEN_TABLE_NAME  "menu"
49 #define SETTING_MENUSCREEN_CLAUSE  "categories = '?'"
50 #define SETTING_MENUSCREEN_VALUE_CATEGORY "home-screen"
51 #define SETTING_MENUSCREEN_COLUMN_NAME  "name"
52 #define SETTING_MENUSCREEN_COLUMN_PKGNAME  "package"
53 #define SETTING_MENUSCREEN_COLUMN_CATEGORY "category"
54
55
56 typedef struct tag_ug_menuscreen_info {
57         char *pkgname;
58         char *appname;
59 } ug_menuscreen_info ;
60
61 typedef struct _SettingMenuscreenUG SettingMenuscreenUG;
62
63 /**
64  * Setting Menuscreen UG context
65  * all UG function has void* as an agument. this is casted back to SettingMenuscreenUG
66  * and the functions access app context.
67  */
68 struct _SettingMenuscreenUG {
69         ui_gadget_h ug;
70
71         /* add more variables here (move your appdata to here) */
72         Evas *evas;
73         Evas_Object *win_main_layout;
74         Evas_Object *win_get;
75
76         Evas_Object *scroller;
77
78         ui_gadget_h ug_loading;
79
80         Evas_Object *ly_main;
81         Evas_Object *ly_wall;
82
83         Evas_Object *navi_bar;  /*  for navigation effect */
84         Elm_Object_Item *navi_it;
85
86         /* entries in Genlist */
87         setting_view *view_to_load;
88
89         /* page 1 : main list */
90         Evas_Object *chk_radio;
91         int pkglist_cnt;
92         int chk_menuscreen;                     /* selcted item */
93         char *selected_theme;
94         Eina_List *menuscreen_list;
95
96         /* page 2 : password */
97         Setting_GenGroupItem_Data *data_pwd;
98
99         Elm_Genlist_Item_Class itc_2text_2;
100         Elm_Genlist_Item_Class itc_1text_1icon_2;
101         Elm_Genlist_Item_Class itc_layout;
102         Elm_Genlist_Item_Class itc_2text_3_parent;
103         Elm_Genlist_Item_Class itc_1icon_1text_sub;
104         Elm_Genlist_Item_Class itc_1text;
105 };
106
107 extern setting_view setting_view_menuscreen_main;
108 extern setting_view setting_view_menuscreen_password;
109
110 void setting_menuscreen_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv);
111
112 #endif                          /* __SETTING_MENUSCREEN_H__ */