apply FSL(Flora Software License)
[apps/home/libug-worldclock-efl.git] / include / worldclock_const.h
1 /*
2   * Copyright 2012  Samsung Electronics Co., Ltd
3   * 
4   * Licensed under the Flora License, Version 1.0 (the "License");
5   * you may not use this file except in compliance with the License.
6   * You may obtain a copy of the License at
7   * 
8   *     http://www.tizenopensource.org/license
9   * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16
17 #ifndef __DEF_WORLDCLOCK_CONST_H_
18 #define __DEF_WORLDCLOCK_CONST_H_
19
20 #ifndef _
21 #define _(s)  dgettext(PACKAGE, s)
22 #endif
23 #ifndef S_
24 #define S_(x) dgettext("sys_string", x)
25 #endif
26 #ifndef _EDJ
27 #define _EDJ(o)         elm_layout_edje_get(o)
28 #endif
29
30 #define BUF_SIZE                256
31 #define BUF_MIN_SIZE            32
32 #define BUF_LARGE_SIZE          512
33
34 #define CITY_BUF_SIZE           128
35 #define COUNTRY_BUF_SIZE        128
36 #define TIMEZONE_BUF_SIZE       32
37 #define TZPATH_BUF_SIZE         128
38
39 #define WORLDCLOCK_MAX_CITY_COUNT   20
40
41 #define WCL_EDJ_PATH                EDJDIR
42 #define WCL_IMAGE_PATH              IMAGEDIR"/code"
43 #define WCL_EDJ_NAME                WCL_EDJ_PATH"/worldclock.edj"
44 #define WCL_THEME_NAME              WCL_EDJ_PATH"/worldclock_theme.edj"
45
46 //#define WORLDCLOCK_FILE_PATH  "/opt/.worldclock.txt"
47 #define WORLDCLOCK_DB           "/opt/dbspace/.worldclock.db"
48
49 #define VCONFKEY_SETAPPL_PREFIX         "db/setting"
50 #define SETTING_THEME_SELECTED_THEME    VCONFKEY_SETAPPL_PREFIX"/selected_theme"
51
52 //#define BG_PATH                               PREFIX"/share/bg"
53 //#define EARTH_PATH                            WCL_IMAGE_PATH"/earth"
54
55 #define WCL_IMAGE_ADD WCL_IMAGE_PATH"/01_controlbar_icon_create.png"
56 #define WCL_IMAGE_DEL WCL_IMAGE_PATH"/01_controlbar_icon_delete.png"
57 #define WCL_IMAGE_CLOSE WCL_IMAGE_PATH"/01_controlbar_icon_close.png"
58
59 /* group name */
60 #define GRP_MAIN                "main_layout"
61 #define GRP_MAIN2               "main_layout2"
62 #define GRP_MAP                 "map"
63 #define GRP_TIMEZONE            "timezone"
64 #define GRP_DELETE              "delete_layout"
65 #define GRP_SEARCH              "search_area"
66 #define GRP_CLOCK               "clock"
67 #define GRP_DST                 "dst"
68 #define GRP_ADD                 "add_layout"
69 #define GRP_ADD2                "add_layout2"
70 #define GRP_SEGMENT_PANEL       "segment_panel_layout"
71 #define GRP_POPUP               "popup"
72 #define GRP_SELECT_ALL          "select_all"
73 #define GRP_EDIT                "edit_layout"
74 #define GRP_EDIT2               "edit_layout2"
75 #define GRP_CHECK               "check"
76
77 //////////////////////////////////////////////////////////////////////////////////////////////
78 //    codes below will be removed
79 /////////////////////////////////////////////////////////////////////////////////////////////
80
81 //#define ENGLISH                                       "en_US.UTF-8"
82 //#define ELEKTRA_BACKGROUND            "system/launcher/background-set"
83 //#define KEYDOWN_INTERVAL              1.4
84 //#define DATA_DIR                              "/root/.worldclock"
85 //#define DATA_PATH                             "/root/.worldclock/worldclock.dat"
86
87 #define ZOOM_IMG_WIDTH          80
88 #define ZOOM_IMG_HEIGHT         80
89 #define ZOOM_BAR_IMG_WIDTH      80
90 #define ZOOM_BAR_IMG_HEIGHT     14
91 #define ZOOM_CENTER_POS_Y       95
92 #define ZOOM_HIDING_TIME        0.5
93 #define ZOOMING_OPERATION_TIME  0.5
94 #define TOUCH_HOLD_RANGE        20
95 #define ZOOM_BETWEEN_BAR_AND_BELOW_ZOOM  8
96 #define ZOOM_CURSOR_X_SEPERATED_DISTANCE 92
97
98 #define TIME_HOUR_MAX_0     12
99 #define TIME_HOUR_MAX_12    12
100
101 #define FLOAT_COMPARE_EPSILON   0.001
102
103 #define WCL_DAY_TIME        6
104 #define WCL_NIGHT_TIME      18
105
106 ///////////////////////// layout //////////////////////////////////////////
107 #define INDICATOR_H             27
108 //#define HEADER_H                              134
109 #define SOFTKEY_H               96
110 #define NAVIGATION_BAR_H        67
111 #define CONTROL_BAR_H           78
112 #define INPUT_PANEL_H           358
113
114 #define SOFTKEY_YREL            0.9025
115 #define WIDTH                   480
116 #define HEIGHT                  800
117
118 #define LABEL_POS_Y             481
119
120 #define DST_W                   50
121 #define DST_H                   50
122
123 #define MAP_SHOW_W              480
124 #define MAP_SHOW_H              480
125
126 #define EARTH_W                 417
127 #define EARTH_H                 415
128
129 #define EARTH_BG_POS_Y          180
130 #define EARTH_BG_W              880
131 #define EARTH_BG_H              440
132 #define EARTH_BG_OFFSET         22
133
134 #define WORLD_CLOCK_W           3500
135 #define WORLD_CLOCK_H           1700
136
137 #define WORLD_TIME_W            306
138 #define WORLD_TIME_H            108
139 #define XRES    480
140 #define YRES    800
141
142 #define DST_SAVING_TIME (60*60)
143
144 #define LIST_HEIGHT             92
145 #define LIST_Y                  118     //800*480  115
146
147 #define TB_PORTRAIT_X (0)
148 #define TB_PORTRAIT_Y (0)
149 #define TB_PORTRAIT_W (480)
150 #define TB_PORTRAIT_H (90)
151
152 #define SK_PORTRAIT_X (0)
153 #define SK_PORTRAIT_Y (722)
154 #define SK_PORTRAIT_W (480)
155 #define SK_PORTRAIT_H (78)
156
157 #define WIDTH               480
158 #define SOFTKEY_H           96
159
160 #define FONT_NANE           "HelveN_Asia"
161 #define TEXT_CLASS_NAME     "worldclock"
162 #define FONT_SIZE           18
163 #define SELECTFONT_SIZE     20
164 #define FONT_COLOR          255 255 255 120
165 #define SELECT_FONT_COLOR   255 255 255 255
166
167 #define MAP_BG_W                    2048
168 #define MAP_BG_H                    1024
169
170 #define CITY_W              24
171 #define CITY_H              24
172
173 #define DST_BG_W                    93
174 #define DST_BG_H                    92
175 #define DST_ICON_START_X          22/DST_BG_W
176 #define DST_ICON_START_Y          21/DST_BG_H
177 #define DST_ICON_END_X          (22 + 50)/DST_BG_W
178 #define DST_ICON_END_Y          (21+50)/DST_BG_H
179
180 #define CLOCK_CHECK_BG_W   50
181 #define CLOCK_CHECK_BG_H   50
182
183 /* for add list view */
184 #define ADD_SEARCH_YREL     0.14
185
186 #define ADD_BG_W                    480
187 #define ADD_BG_H                    319
188
189 #define TIME_W              480
190 #define TIME_H              70
191
192 #define DATE_W              480
193 #define DATE_H              32
194
195 #define FONT_NANE           "HelveN_Asia"
196 #define TIME_CLASS          "time"
197 #define DATE_CLASS          "time"
198 #define TIME_SIZE           42
199 #define DATE_SIZE           28
200
201 /*For select all view*/
202 #define SELECTALL_Y     82
203 #define SELECTALL_DELETE_VIEW_H (800-SELECTALL_Y)
204 #define SELECTALL_H     70
205 #define SELECTALL_TEXT_R1_X     25
206 #define SELECTALL_TEXT_R2_X     -200
207 #define SELECTALL_CHECK_R1_X    415
208 #define SELECTALL_CHECK_R1_Y    21
209 #define SELECTALL_CHECK_R2_X    -35
210 #define SELECTALL_CHECK_R2_Y    -21
211
212 /*For search view*/
213 #define SEARCHVIEW_Y    38
214 #define SEARCHVIEW_H    (800-SEARCHVIEW_Y)
215 #define SEARCHBAR_H     67
216
217 #define SEARCH_BUTTON_W         60
218 #define SEARCH_BUTTON_H         60
219 #define SEARCH_ENTRY_L_W        1
220 #define SEARCH_ENTRY_R_W        3
221 #define SEARCH_ENTRY_H          64
222
223 #define SEARCH_ENTRY_L_R1_X     12
224 #define SEARCH_ENTRY_L_R1_Y     2
225 #define SEARCH_ENTRY_L_R2_Y     (SEARCH_ENTRY_L_R1_Y+SEARCH_ENTRY_H)
226
227 #define SEARCH_ENTRY_C_R1_X     (SEARCH_ENTRY_L_R1_X+1)
228 #define SEARCH_ENTRY_C_R1_Y     (SEARCH_ENTRY_L_R1_Y+4)
229 #define SEARCH_ENTRY_C_LENGTH   389
230 #define SEARCH_ENTRY_C_R2_X     (SEARCH_ENTRY_L_R1_X+SEARCH_ENTRY_C_LENGTH+1)
231 #define SEARCH_ENTRY_C_R2_Y     (SEARCH_ENTRY_L_R2_Y-5)
232
233 #define SEARCH_ENTRY_R_R1_X     (SEARCH_ENTRY_C_R1_X+SEARCH_ENTRY_C_LENGTH)
234 #define SEARCH_ENTRY_R_R1_Y     SEARCH_ENTRY_L_R1_Y
235
236 #define SEARCH_ENTRY_R_R2_X     SEARCH_ENTRY_R_R1_X
237 #define SEARCH_ENTRY_R_R2_Y     SEARCH_ENTRY_L_R2_Y
238
239 #define SEARCH_BUTTON_R1_X      412
240 #define SEARCH_BUTTON_R1_Y      3
241 #define SEARCH_BUTTON_R2_X      -8
242 #define SEARCH_BUTTON_R2_Y      (SEARCH_BUTTON_R1_Y+60)
243
244 #define SEARCH_CONTENT_X        20
245 #define SEARCH_SELECTALL_FONT_SIZE      34
246
247 ////////////////////// layout finish ////////////////////////////
248 #endif                          /* __DEF_WORLDCLOCK_CONST_H_ */