[misc] Add tag & release pkg
[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.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
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 enum cld_ug_mode {
29         _MODE_UNKNOWN = 0,
30         _MODE_GET_EVT,
31         _MODE_GET_VCS,
32         _MODE_VIEW_VCS,
33 };
34
35 typedef enum{
36         FIRST_DAY_LOCALE_DEFAULT = -1,
37         FIRST_DAY_SUNDAY = 0,
38         FIRST_DAY_MONDAY = 1,
39         FIRST_DAY_SATURDAY = 6,
40 } cld_first_day_type;
41
42 typedef struct {
43         int cnt;
44         int cnt_loop;
45         int cnt_checked_total;
46         int result;
47         bool alive;
48         bool completed;
49         pthread_t thread;
50         Ecore_Timer *timer;
51         Evas_Object *progressbar;
52         Evas_Object *layout;
53         Evas_Object *label;
54 } cal_progress_info;
55
56 struct ug_data {
57         Evas_Object *base;
58         Evas_Object *layout;
59         ui_gadget_h ug;
60
61         Evas_Object *naviframe;
62         Evas_Object *cont;
63         Evas_Object *bg;
64
65         enum cld_ug_mode mode;
66         char *caller;
67         char *vcs_file;
68
69         Elm_Object_Item *item_time_zone_on_off;
70         Elm_Object_Item *item_time_zone_guide;
71         Elm_Object_Item *item_time_zone;
72         Elm_Object_Item *item_first_day_of_week;
73         Evas_Object *rgd_first_day;
74
75         Evas_Object *genlist;
76
77         int is_on;
78         cld_first_day_type first_day_of_week;
79         int is_complete_todo;
80         int is_display_weeknumber;
81
82         char *city;
83         char *time_zone;
84
85         Evas_Object *popup;
86         Eina_List *my_phone_calendar_list;
87         Eina_List *checked_calendar_list;
88         Evas_Object *notify;
89
90         char *path;
91         cal_progress_info *p_info;
92         int setting_mode;
93
94         Ecore_Idler *idler;
95 };
96
97 void cal_list_ug_create(const char *title, struct ug_data *ugd);
98
99 // TODO: get full path from caller
100 #define VFILE_PATH "/opt/usr/media/Others"
101
102 #endif /* __CALENDAR_UG_H__ */