Tizen 2.0 Release
[apps/home/settings.git] / setting-display / include / setting-display.h
1 /*
2  * setting
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Flora License, Version 1.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://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_DISPLAY_H__
18 #define __SETTING_DISPLAY_H__
19
20 #include <stdio.h>
21 #include <string.h>
22
23 #include <Elementary.h>
24
25
26 #include <glib-object.h>
27
28 #include <setting-common-draw-widget.h>
29 #include <setting-common-view.h>
30
31 #include <device.h>
32 #include <devman_image.h>
33
34 #define Keystr_SmartScreen      "IDS_ST_MBODY_SMART_SCREEN"
35 #define Keystr_ScreenMode       "IDS_ST_BODY_SCREEN_MODE"
36 #define Keystr_Dynamic          "IDS_ST_BODY_DYNAMIC_T_DISPLAY_EFFECT"
37 #define Keystr_Standard         "IDS_ST_BODY_STANDARD_T_DISPLAY_EFFECT"
38 #define Keystr_Natural          "IDS_ST_BODY_NATURAL_T_DISPLAY_EFFECT"
39 #define Keystr_Movie            "IDS_ST_BODY_MOVIE_T_DISPLAY_EFFECT"
40
41 typedef enum {
42         WALLPAPER_CUR_SEL_NONE = 0,
43         WALLPAPER_CUR_SEL_HOME_SCREEN,
44         WALLPAPER_CUR_SEL_LOCK_SCREEN,
45         WALLPAPER_CUR_SEL_HOME_AND_LOCK_SCREEN
46 } Wallpaper_Cur_Sel;
47
48 typedef struct _SettingDisplayUG SettingDisplayUG;
49
50 #define OPENING_EFFECT 0
51 #define BRIGHTNESS_DISPLAY 0
52
53 /**
54  * Setting Display UG context
55  * all UG function has void* as an agument. this is casted back to SettingDisplayUG
56  * and the functions access app context.
57  */
58 struct _SettingDisplayUG {
59         ui_gadget_h ug;
60
61         /* add more variables here (move your appdata to here) */
62         Evas *evas;
63         Evas_Object *win_main_layout;
64         Evas_Object *win_get;
65
66         ui_gadget_h ug_loading;
67
68         Evas_Object *ly_main;
69         Evas_Object *ly_wall;
70
71         Evas_Object *navi_bar;  /*  for navigation effect */
72
73         Setting_GenGroupItem_Data *data_screen_mode;
74         Setting_GenGroupItem_Data *data_br;
75         Setting_GenGroupItem_Data *data_back;
76         Setting_GenGroupItem_Data *data_br_auto;
77         Setting_GenGroupItem_Data *data_br_sli;
78
79 #if OPENING_EFFECT
80         Setting_GenGroupItem_Data *data_launch_effect;
81 #endif
82
83         Setting_GenGroupItem_Data *data_launch_image;
84         Setting_GenGroupItem_Data *data_battery;
85
86         Setting_GenGroupItem_Data *data_auto_adjust_scrn_tone;
87
88         // for wallpaper
89         Wallpaper_Cur_Sel cur_sel;
90         Evas_Object *view_layout;
91         Evas_Object *selInfoPop;
92         Evas_Object *selInfoPop_layout;
93         Setting_GenGroupItem_Data *data_home_screen;
94         Setting_GenGroupItem_Data *data_lock_screen;
95         Setting_GenGroupItem_Data *data_home_lock_screen;
96
97         //int bright_value;
98         int low_bat;
99
100         setting_view *view_to_load;
101
102         Evas_Object *popup_chk;
103         Evas_Object *popup;
104
105         Elm_Genlist_Item_Class itc_2text_2;
106         Elm_Genlist_Item_Class itc_1text_1icon;
107         Elm_Genlist_Item_Class itc_seperator;
108         Elm_Genlist_Item_Class itc_2text_3_parent;
109         Elm_Genlist_Item_Class itc_1icon_1text_sub;
110         Elm_Genlist_Item_Class itc_1text;
111         Elm_Genlist_Item_Class itc_screen_mode;
112
113         ui_gadget_h ug_gallery;
114         ui_gadget_h ug_imageviewer;
115         Eina_Bool wallpaper_changed;
116
117         Setting_GenGroupItem_Data *data_backlight_1min;
118         Setting_GenGroupItem_Data *data_backlight_2min;
119         Setting_GenGroupItem_Data *data_backlight_5min;
120         Setting_GenGroupItem_Data *data_backlight_10min;
121         //Improve response speed
122         Ecore_Idler *set_idler;
123 };
124
125 extern setting_view setting_view_display_main;
126 extern setting_view setting_view_display_brightness;
127 extern setting_view setting_view_display_wallpaper;
128 extern setting_view setting_view_display_screen_mode;
129
130 void setting_display_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode,
131                                   void *priv);
132
133 #endif                          /* __SETTING_DISPLAY_H__ */