[misc] Sycn with master branch.
[apps/core/preloaded/calendar.git] / ug / settings / ug-settings.h
1 /*
2   *
3   *  Copyright 2012  Samsung Electronics Co., Ltd
4   *
5   *  Licensed under the Flora License, Version 1.1 (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
18
19 #ifndef __CALENDAR_UG_H__
20 #define __CALENDAR_UG_H__
21
22 #include <Elementary.h>
23 #include <ui-gadget-module.h>
24
25 #define CAL_TEXT_MAX_LEN 1024
26 #define CAL_TEXT_SHORT_LEN 256
27
28 typedef enum{
29         FIRST_DAY_LOCALE_DEFAULT = -1,
30         FIRST_DAY_SUNDAY = 0,
31         FIRST_DAY_MONDAY = 1,
32         FIRST_DAY_SATURDAY = 6,
33 } cld_first_day_type;
34
35 typedef struct {
36         int cnt;
37         int cnt_loop;
38         int cnt_checked_total;
39         int result;
40         bool alive;
41         bool completed;
42         pthread_t thread;
43         Ecore_Timer *timer;
44         Evas_Object *progressbar;
45         Evas_Object *layout;
46         Evas_Object *label;
47 } cal_progress_info;
48
49 struct ug_data {
50         Evas_Object *base;
51         Evas_Object *layout;
52         ui_gadget_h ug;
53
54         Evas_Object *naviframe;
55         Evas_Object *cont;
56         Evas_Object *bg;
57
58         Elm_Object_Item *item_time_zone_on_off;
59         Elm_Object_Item *item_time_zone_guide;
60         Elm_Object_Item *item_time_zone;
61         Elm_Object_Item *item_first_day_of_week;
62         Evas_Object *rgd_first_day;
63
64         Evas_Object *genlist;
65
66         int is_on;
67         cld_first_day_type first_day_of_week;
68         int is_complete_todo;
69         int is_display_weeknumber;
70
71         char *city;
72         char *time_zone;
73
74         Evas_Object *popup;
75         Eina_List *my_phone_calendar_list;
76         Eina_List *checked_calendar_list;
77         Evas_Object *notify;
78
79         char *path;
80         cal_progress_info *p_info;
81         int setting_mode;
82
83         Ecore_Idler *idler;
84 };
85
86 void cal_list_ug_create(const char *title, struct ug_data *ugd);
87
88 // TODO: get full path from caller
89 #define VFILE_PATH "/opt/usr/media/Others"
90
91 #endif /* __CALENDAR_UG_H__ */