3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 * http://floralicense.org/license/
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.
18 #ifndef __SETTING_POWERSAVING_H__
19 #define __SETTING_POWERSAVING_H__
24 #include <Elementary.h>
26 #include <glib-object.h>
28 #include <setting-common-draw-widget.h>
29 #include <setting-common-view.h>
31 #define SUPPORT_UI0_3 0
32 #define SUPPORT_UI0_4 1
34 /* string resources..*/
36 #define KeyStr_Powersaving_Mode "IDS_ST_BODY_POWER_SAVING_MODE"
37 #define KeyStr_Powersaving_Mode_DSC "Use default settings for power saving. Settings will be enabled immediately."
39 /* To do : strings of custom power saving will be removed. */
40 #define KeyStr_Powersaving_Customed_Mode "Custom power saving mode"
41 #define KeyStr_Powersaving_Customed "Custom power saving settings"
42 #define KeyStr_Powersaving_Level_DSC "Use settings for power saving. Settings will be enabled when battery level is below the value you set."
44 #define KeyStr_Powersaving_Tips "IDS_ST_MBODY_POWER_SAVING_TIPS"
45 #define KeyStr_Powersaving_About "IDS_ST_BODY_LEARN_ABOUT_POWER_SAVING"
47 //in "Custom settings" view
48 #define __TURN_Off "Turn off "
49 #define KeyStr_WIFI_Off __TURN_Off"Wi-Fi"
50 #define KeyStr_BT_Off __TURN_Off"Bluetooth"
51 #define KeyStr_GPS_Off __TURN_Off"GPS"
52 #define KeyStr_SYNC_Off __TURN_Off"Data sync"
53 #define KeyStr_HOTSPOT_Off __TURN_Off"Portable Wi-Fi hotspot"
54 #define KeyStr_Adjust_Bright "Adjust brightness"
56 #define KeyStr_Powersaving_AT "Enable power saving at"
57 #define KeyStr_Screen_Timeout "IDS_ST_BACKLIGHT_TIME"
59 #define SETTING_POWERSAVING_AT_10_STR "10% battery power"
60 #define SETTING_POWERSAVING_AT_20_STR "20% battery power"
61 #define SETTING_POWERSAVING_AT_30_STR "30% battery power"
62 #define SETTING_POWERSAVING_AT_40_STR "40% battery power"
63 #define SETTING_POWERSAVING_AT_50_STR "50% battery power"
68 #define KeyStr_PS_SETTINGS "IDS_ST_BODY_POWER_SAVING_MODE_SETTINGS"
69 #define KeyStr_CPU_PS "IDS_ST_BODY_CPU_POWER_SAVING"
70 #define KeyStr_CPU_PS_DSC "IDS_ST_BODY_LIMIT_THE_MAXIMUM_PERFORMANCE_OF_THE_CPU"
71 #define KeyStr_DISPLAY_PS "IDS_ST_BODY_SCREEN_POWER_SAVING"
72 #define KeyStr_DISPLAY_PS_DSC "IDS_ST_BODY_USE_LOW_POWER_LEVEL_FOR_SCREEN"
73 #define KeyStr_BG_COLOR "IDS_ST_DISPLAYSETTINGS_BODY_MAINGREETINGEDITSTYLEBGCOLOUR"
74 #define KeyStr_BG_COLOR_DSC "IDS_ST_BODY_CHANGE_BACKGROUND_COLOUR_TO_SAVE_POWER_IN_EMAIL_AND_INTERNET"
75 #define KeyStr_SCREEN_VIB "IDS_ST_BODY_TURN_OFF_HAPTIC_FEEDBACK"
76 #define KeyStr_SCREEN_VIB_DSC "IDS_ST_BODY_TURNING_OFF_HAPTIC_FEEDBACK_CAN_EXTEND_BATTERY_LIFE"
78 #define SETTING_POWERSAVING_ALL_SUB_ITEMS_OFF "To turn on the Power saving mode. At least one item should be selected"
80 typedef struct _SettingPowersavingUG SettingPowersavingUG;
83 *Setting Powersaving UG context
84 *all UG function has void * as an agument. this is casted back to SettingPowersavingUG
85 *and the functions access app context.
87 struct _SettingPowersavingUG {
90 /* add more variables here (move your appdata to here) */
92 Evas_Object *win_main_layout;
95 Evas_Object *popup_chk;
98 Evas_Object *navi_bar;
100 Setting_GenGroupItem_Data *data_powersaving_active;
101 Setting_GenGroupItem_Data *data_customed_active;
102 Setting_GenGroupItem_Data *data_customed_setting;
103 Setting_GenGroupItem_Data *data_powersaving_about;
105 Setting_GenGroupItem_Data *data_cpu_ps;
106 Setting_GenGroupItem_Data *data_display_ps;
107 Setting_GenGroupItem_Data *data_bg_color;
108 Setting_GenGroupItem_Data *data_screen_vib;
110 Setting_GenGroupItem_Data *data_saving_at;
111 Setting_GenGroupItem_Data *data_screen_timeout;
112 Setting_GenGroupItem_Data *data_wifi_off;
113 Setting_GenGroupItem_Data *data_bt_off;
114 Setting_GenGroupItem_Data *data_gps_off;
115 Setting_GenGroupItem_Data *data_sync_off;
116 Setting_GenGroupItem_Data *data_hotspot_off;
117 Setting_GenGroupItem_Data *data_adjust_bright;
118 Setting_GenGroupItem_Data *data_brightness;
120 Setting_GenGroupItem_Data *data_br_auto;
121 Setting_GenGroupItem_Data *data_br_sli;
125 extern setting_view setting_view_powersaving_main;
126 extern setting_view setting_view_powersaving_customed;
127 extern setting_view setting_view_powersaving_about;
128 extern setting_view setting_view_powersaving_brightness;
129 extern void setting_powersaving_ug_exp_cb(void *data, Evas_Object *obj, void *event_info);
130 extern char *setting_powersaving_ug_get_brightness_str();
132 #endif /* __SETTING_POWERSAVING_H__ */