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>
32 #define SUPPORT_UI0_3 0
33 #define SUPPORT_UI0_4 1
35 /* string resources..*/
37 #define KeyStr_Powersaving_Mode "IDS_ST_BODY_POWER_SAVING_MODE"
38 #define KeyStr_Powersaving_Mode_DSC "Use default settings for power saving. Settings will be enabled immediately."
40 /* To do : strings of custom power saving will be removed. */
41 #define KeyStr_Powersaving_Customed_Mode "Custom power saving mode"
42 #define KeyStr_Powersaving_Customed "Custom power saving settings"
43 #define KeyStr_Powersaving_Level_DSC "Use settings for power saving. Settings will be enabled when battery level is below the value you set."
45 #define KeyStr_Powersaving_Tips "IDS_ST_MBODY_POWER_SAVING_TIPS"
46 #define KeyStr_Powersaving_About "IDS_ST_BODY_LEARN_ABOUT_POWER_SAVING"
48 //in "Custom settings" view
49 #define __TURN_Off "Turn off "
50 #define KeyStr_WIFI_Off __TURN_Off"Wi-Fi"
51 #define KeyStr_BT_Off __TURN_Off"Bluetooth"
52 #define KeyStr_GPS_Off __TURN_Off"GPS"
53 #define KeyStr_SYNC_Off __TURN_Off"Data sync"
54 #define KeyStr_HOTSPOT_Off __TURN_Off"Portable Wi-Fi hotspot"
55 #define KeyStr_Adjust_Bright "Adjust brightness"
57 #define KeyStr_Powersaving_AT "Enable power saving at"
58 #define KeyStr_Screen_Timeout "IDS_ST_BACKLIGHT_TIME"
60 #define SETTING_POWERSAVING_AT_10_STR "10% battery power"
61 #define SETTING_POWERSAVING_AT_20_STR "20% battery power"
62 #define SETTING_POWERSAVING_AT_30_STR "30% battery power"
63 #define SETTING_POWERSAVING_AT_40_STR "40% battery power"
64 #define SETTING_POWERSAVING_AT_50_STR "50% battery power"
69 #define KeyStr_PS_SETTINGS "IDS_ST_BODY_POWER_SAVING_MODE_SETTINGS"
70 #define KeyStr_CPU_PS "IDS_ST_BODY_CPU_POWER_SAVING"
71 #define KeyStr_CPU_PS_DSC "IDS_ST_BODY_LIMIT_THE_MAXIMUM_PERFORMANCE_OF_THE_CPU"
72 #define KeyStr_DISPLAY_PS "IDS_ST_BODY_SCREEN_POWER_SAVING"
73 #define KeyStr_DISPLAY_PS_DSC "IDS_ST_BODY_USE_LOW_POWER_LEVEL_FOR_SCREEN"
74 #define KeyStr_BG_COLOR "IDS_ST_DISPLAYSETTINGS_BODY_MAINGREETINGEDITSTYLEBGCOLOUR"
75 #define KeyStr_BG_COLOR_DSC "IDS_ST_BODY_CHANGE_BACKGROUND_COLOUR_TO_SAVE_POWER_IN_EMAIL_AND_INTERNET"
76 #define KeyStr_SCREEN_VIB "IDS_ST_BODY_TURN_OFF_HAPTIC_FEEDBACK"
77 #define KeyStr_SCREEN_VIB_DSC "IDS_ST_BODY_TURNING_OFF_HAPTIC_FEEDBACK_CAN_EXTEND_BATTERY_LIFE"
79 #define SETTING_POWERSAVING_ALL_SUB_ITEMS_OFF "To turn on the Power saving mode. At least one item should be selected"
81 typedef struct _SettingPowersavingUG SettingPowersavingUG;
84 *Setting Powersaving UG context
85 *all UG function has void * as an agument. this is casted back to SettingPowersavingUG
86 *and the functions access app context.
88 struct _SettingPowersavingUG {
91 /* add more variables here (move your appdata to here) */
93 Evas_Object *win_main_layout;
96 Evas_Object *popup_chk;
99 Evas_Object *navi_bar;
101 Setting_GenGroupItem_Data *data_powersaving_active;
102 Setting_GenGroupItem_Data *data_customed_active;
103 Setting_GenGroupItem_Data *data_customed_setting;
104 Setting_GenGroupItem_Data *data_powersaving_about;
106 Setting_GenGroupItem_Data *data_cpu_ps;
107 Setting_GenGroupItem_Data *data_display_ps;
108 Setting_GenGroupItem_Data *data_bg_color;
109 Setting_GenGroupItem_Data *data_screen_vib;
111 Setting_GenGroupItem_Data *data_saving_at;
112 Setting_GenGroupItem_Data *data_screen_timeout;
113 Setting_GenGroupItem_Data *data_wifi_off;
114 Setting_GenGroupItem_Data *data_bt_off;
115 Setting_GenGroupItem_Data *data_gps_off;
116 Setting_GenGroupItem_Data *data_sync_off;
117 Setting_GenGroupItem_Data *data_hotspot_off;
118 Setting_GenGroupItem_Data *data_adjust_bright;
119 Setting_GenGroupItem_Data *data_brightness;
121 Setting_GenGroupItem_Data *data_br_auto;
122 Setting_GenGroupItem_Data *data_br_sli;
126 extern setting_view setting_view_powersaving_main;
127 extern setting_view setting_view_powersaving_customed;
128 extern setting_view setting_view_powersaving_about;
129 extern setting_view setting_view_powersaving_brightness;
130 extern void setting_powersaving_ug_exp_cb(void *data, Evas_Object *obj, void *event_info);
131 extern char *setting_powersaving_ug_get_brightness_str();
133 #endif /* __SETTING_POWERSAVING_H__ */