Initialize Tizen 2.3
[apps/home/settings.git] / setting-menuscreen / include / setting-menuscreen.h
1 /*
2  * setting
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Flora License, Version 1.1 (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 #ifndef __SETTING_MENUSCREEN_H__
18 #define __SETTING_MENUSCREEN_H__
19
20 #include <stdio.h>
21 #include <string.h>
22
23 #include <Elementary.h>
24
25 #include <glib-object.h>
26
27 #include <Eina.h>
28 #include <ail.h>
29 #include <aul.h>
30
31 #include <setting-common-draw-widget.h>
32 #include <setting-common-view.h>
33
34 #define SETTING_PW_STR "16777216"
35 #define SETTING_THEME_LIVE_MAGAZINE     "com.samsung.live-magazine"
36 #define SETTING_THEME_CLUSTER_HOME              "com.samsung.cluster-home"
37
38 #define SETTING_MENUSCREEN_FOLDER "/opt/share/install-info/"
39 #define SETTING_MENUSCREEN_FILE_EXTENSION "desktop"
40 #define SETTING_MENUSCREEN_INDEX_NAME "name"
41
42 #define SETTING_MENUSCREEN_SELECTED_PACKAGE_VCONF_KEY VCONFKEY_SETAPPL_SELECTED_PACKAGE_NAME
43
44 #define SETTING_MENUSCREEN_TABLE_NAME  "menu"
45 #define SETTING_MENUSCREEN_CLAUSE  "categories = '?'"
46 #define SETTING_MENUSCREEN_VALUE_CATEGORY "home-screen"
47 #define SETTING_MENUSCREEN_COLUMN_NAME  "name"
48 #define SETTING_MENUSCREEN_COLUMN_PKGNAME  "package"
49 #define SETTING_MENUSCREEN_COLUMN_CATEGORY "category"
50
51
52 typedef struct tag_ug_menuscreen_info {
53     char* pkgname;
54     char* appname;
55 }ug_menuscreen_info ;
56
57 typedef struct _SettingMenuscreenUG SettingMenuscreenUG;
58
59 /**
60  * Setting Menuscreen UG context
61  * all UG function has void* as an agument. this is casted back to SettingMenuscreenUG
62  * and the functions access app context.
63  */
64 struct _SettingMenuscreenUG {
65         ui_gadget_h ug;
66
67         /* add more variables here (move your appdata to here) */
68         Evas *evas;
69         Evas_Object *win_main_layout;
70         Evas_Object *win_get;
71
72         Evas_Object *scroller;
73
74         ui_gadget_h ug_loading;
75
76         Evas_Object *ly_main;
77         Evas_Object *ly_wall;
78
79         Evas_Object *navi_bar;  /*  for navigation effect */
80         Elm_Object_Item *navi_it;
81
82         /* entries in Genlist */
83         setting_view *view_to_load;
84
85         // page 1 : main list
86         Evas_Object* chk_radio;
87         int pkglist_cnt;
88         int chk_menuscreen;                     // selcted item
89         char* selected_theme;
90         Eina_List * menuscreen_list;
91
92         // page 2 : password
93         Setting_GenGroupItem_Data* data_pwd;
94
95         Elm_Genlist_Item_Class itc_2text_2;
96         Elm_Genlist_Item_Class itc_1text_1icon_2;
97         Elm_Genlist_Item_Class itc_layout;
98         Elm_Genlist_Item_Class itc_seperator;
99         Elm_Genlist_Item_Class itc_2text_3_parent;
100         Elm_Genlist_Item_Class itc_1icon_1text_sub;
101         Elm_Genlist_Item_Class itc_1text;
102 };
103
104 extern setting_view setting_view_menuscreen_main;
105 extern setting_view setting_view_menuscreen_password;
106
107 void setting_menuscreen_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv);
108
109 #endif                          /* __SETTING_MENUSCREEN_H__ */