4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
6 * Contact: MyoungJune Park <mj2004.park@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 #ifndef __SETTING_TIME_H__
22 #define __SETTING_TIME_H__
26 #include <sys/ioctl.h>
27 #include <linux/rtc.h>
30 #include <Elementary.h>
33 #include <glib-object.h>
35 #include <setting-common-draw-widget.h>
36 #include <setting-common-view.h>
38 #define ERR_BIGGER_THAN_2037 "Cannot Set the year bigger than 2037"
39 #define AUTO_TIME_UPDATE_ON "Automatic time update is ON!"
40 #define SETTING_TIME_AUTO_UPDATE_DESC "IDS_ST_BODY_USE_TIME_PROVIDED_BY_NETWORK"
41 #define NOT_SUPPORT_AUTO_UPDATE_DESC "IDS_ST_POP_AUTO_TIME_UPDATE_UNAVAILABLE_CHOOSE_ALTERNATIVE_TIME_SET_MODE_JPN_SBM"
44 #define DATE_TIME_STR_AUTOMATIC_UPDATE "IDS_ST_MBODY_AUTO_UPDATE"
45 #define DATE_TIME_STR_TIME_ZONE "IDS_ST_BODY_TIME_ZONE"
46 #define DATE_TIME_STR_DATE_AND_TIME "IDS_ST_BODY_DATE_AND_TIME"
47 #define DATE_TIME_STR_TIME_FORMAT "IDS_ST_BODY_MSG_TIME_FORMAT"
50 typedef struct _SettingTimeUG SettingTimeUG;
53 * Setting Time UG context
54 * all UG function has void* as an agument. this is casted back to SettingTimeUG
55 * and the functions access app context.
57 struct _SettingTimeUG {
59 ui_gadget_h ug; /**< ug struct itself */
61 /* add more variables here (move your appdata to here) */
64 app_control_h bundle_data; /**< when loading this UG, bundle is stored */
66 Evas_Object *win_main_layout;
70 ui_gadget_h ug_loading;
72 Evas_Object *navi_bar;
73 Evas_Object *scrl_main;
76 #ifdef USE_TIMER_UPDATE_TIME_IN_TIME_VIEW
77 Ecore_Timer *update_timer;
79 Evas_Object *pop_progress;
81 Eina_Bool is_datefield_selected;
84 Setting_GenGroupItem_Data *data_auto;
85 Setting_GenGroupItem_Data *data_tz;
86 Setting_GenGroupItem_Data *data_time;
87 Setting_GenGroupItem_Data *data_time_fmt;
88 Setting_GenGroupItem_Data *data_date_fmt;
90 /*Evas_Object *chk_dst; */
91 /*Evas_Object *chk_auto; */
93 Elm_Genlist_Item_Class itc_2text_2;
94 Elm_Genlist_Item_Class itc_2text_arrow;
95 Elm_Genlist_Item_Class itc_1text_1icon;
96 Elm_Genlist_Item_Class itc_layout;
97 Elm_Genlist_Item_Class itc_2text_3_parent;
98 Elm_Genlist_Item_Class itc_1icon_1text_sub;
100 Ecore_Idler *update_timezone_idler;
101 Ecore_Idler *refresh_time_idler;
103 int is_expand_time_format_list;
106 extern setting_view setting_view_time_main;
108 #endif /* __SETTING_TIME_H__ */