apply string IDs in code
[apps/core/preloaded/settings.git] / setting-time / include / setting-time.h
1 /*
2  * setting
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
5  *
6  * Contact: MyoungJune Park <mj2004.park@samsung.com>
7  *
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
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
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.
19  *
20  */
21 #ifndef __SETTING_TIME_H__
22 #define __SETTING_TIME_H__
23
24 #include <stdio.h>
25 #include <time.h>
26 #include <sys/ioctl.h>
27 #include <linux/rtc.h>
28 #include <fcntl.h>
29 #include <unistd.h>
30 #include <Elementary.h>
31
32 #include <glib-object.h>
33
34 #include <heynoti.h>
35
36 #include <setting-common-draw-widget.h>
37 #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
42 typedef struct _SettingTimeUG SettingTimeUG;
43
44 /**
45  * Setting Time UG context
46  * all UG function has void* as an agument. this is casted back to SettingTimeUG
47  * and the functions access app context.
48  */
49 struct _SettingTimeUG {
50
51         ui_gadget_h ug; /**< ug struct itself */
52
53         /* add more variables here (move your appdata to here) */
54         int noti_fd;
55
56         service_h bundle_data; /**< when loading this UG, bundle is stored */
57         Evas *evas;
58         Evas_Object *win_main_layout;
59         Evas_Object *win_get;
60         Evas_Object *ly_main;
61
62         ui_gadget_h ug_loading;
63
64         Evas_Object *navi_bar;
65         Evas_Object *scrl_main;
66         char *caller;
67
68         Ecore_Timer *update_timer;
69         Ecore_Timer *heynoti_timer;
70         Evas_Object *pop_progress;
71         Evas_Object *pop;
72         time_t changed_time;
73         Eina_Bool is_datefield_selected;
74
75         /*  UI   */
76         Setting_GenGroupItem_Data *data_auto;
77         Setting_GenGroupItem_Data *data_tz;
78         Setting_GenGroupItem_Data *data_dst;
79         Setting_GenGroupItem_Data *data_time;
80         Setting_GenGroupItem_Data *data_time_fmt;
81         Setting_GenGroupItem_Data *data_date_fmt;
82         Setting_GenGroupItem_Data *data_firstday_week_fmt;
83
84         Evas_Object *chk_dst;
85         Evas_Object *chk_auto;
86
87         Elm_Genlist_Item_Class itc_2text_2;
88         Elm_Genlist_Item_Class itc_2text_arrow;
89         Elm_Genlist_Item_Class itc_1text_1icon;
90         Elm_Genlist_Item_Class itc_seperator;
91         Elm_Genlist_Item_Class itc_layout;
92         Elm_Genlist_Item_Class itc_2text_3_parent;
93         Elm_Genlist_Item_Class itc_1icon_1text_sub;
94
95         Ecore_Idler *update_timezone_idler;
96         Ecore_Idler *refresh_time_idler;
97 };
98
99 extern setting_view setting_view_time_main;
100
101 #endif                          /* __SETTING_TIME_H__ */