79b9d5d8fc95e6bbe21320cdd8d94ee610b35a18
[apps/core/preloaded/calendar.git] / data / edc / layout / inc.main.month.cal.edc
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 //base 690x850
19 //HD size 720x1280
20
21 #ifndef _RATIO_
22 #define _RATIO_
23 #define R_X (480.0/720.0)
24 #define R_Y (800.0/1280.0)
25 #endif
26
27 #define HEIGHT_OF_WDAY (47.0*R_Y)
28 #define HEIGHT_OF_WDAY_LINE (3.0*R_Y)
29 #define HEIGHT_OF_DAY_BLOCK (107.0*R_Y)
30 #define WIDTH_OF_DAY_BLOCK (103.0*R_X)
31 #define HEIGHT_OF_DAY_CHECK (32.0*R_Y)
32 #define WIDTH_OF_DAY_CHECK (32.0*R_X)
33
34 #define WIDTH_OF_DAY (102*R_X)
35 #define WDAY_LEFT_OFFSET (8*R_X)
36 #define DAY_LEFT_OFFSET (10*R_X)
37
38 #define WIDTH_OF_BG (100)
39 #define HEIGHT_OF_BG (100)
40
41 #define WIDTH_OF_BG_L (58)
42 #define HEIGHT_OF_BG_L (58)
43
44 #define WIDTH_OF_WNUMBER (48)
45 #define WIDTH_OF_WNUMBER_L (38)
46
47 #define WD(_pos) \
48         part { name, "wday/"#_pos"/base"; \
49                 type, RECT; \
50                 description { \
51                         state, "default" 0.0; \
52                         rel1 { \
53                                 relative: (_pos % 7 / 7) 0; \
54                                 to, "wday/base"; \
55                         } \
56                         rel2 { \
57                                 relative: (_pos % 7 / 7 + 1 / 7) 1; \
58                                 to, "wday/base"; \
59                         } \
60                         color, 0 0 0 0; \
61                 } \
62         } \
63         part { name, "wday/"#_pos"/text"; \
64                 type, TEXT; \
65                 mouse_events, 0; \
66                 scale, 1; \
67                 description { \
68                         state, "default" 0.0; \
69                         rel1.to, "wday/"#_pos"/base"; \
70                         rel2.to, "wday/"#_pos"/base"; \
71                         color, COLOR_OF_WEEK_DAY_TEXT_FOR_MONTH_CAL; \
72                         text { \
73                                 font, "SLP:style=Medium"; \
74                                 size, 26; \
75                                 align, 0.5 0.5; \
76                         } \
77                 } \
78                 description { \
79                         state, "sunday" 0.0; \
80                         inherit, "default" 0.0; \
81                         color, COLOR_OF_SUNDAY_TEXT_FOR_MONTH_CAL; \
82                 } \
83                 description { \
84                         state, "satday" 0.0; \
85                         inherit, "default" 0.0; \
86                         color, COLOR_OF_SATDAY_TEXT_FOR_MONTH_CAL; \
87                 } \
88         } \
89         programs { \
90                 program { name, "wday/"#_pos"/weekday"; \
91                         signal, "weekday,"#_pos; \
92                         source, "prog"; \
93                         action, STATE_SET "default" 0.0; \
94                         target, "wday/"#_pos"/text"; \
95                 } \
96                 program { name, "wday/"#_pos"/sunday"; \
97                         signal, "sunday,"#_pos; \
98                         source, "prog"; \
99                         action, STATE_SET "sunday" 0.0; \
100                         target, "wday/"#_pos"/text"; \
101                 } \
102                 program { name, "wday/"#_pos"/satday"; \
103                         signal, "satday,"#_pos; \
104                         source, "prog"; \
105                         action, STATE_SET "satday" 0.0; \
106                         target, "wday/"#_pos"/text"; \
107                 } \
108         }
109
110
111 // day block
112 #define DB(_line, _pos, _vert) \
113         part { name, "db/"#_pos"/base"; \
114                 type, RECT; \
115                 ignore_flags, ON_HOLD; \
116                 description { \
117                         state, "default" 0.0; \
118                         rel1 { \
119                                 relative, (_pos % 7 / 7) \
120                                         (_line / 6); \
121                                 to_x, "day/base"; \
122                                 to_y, "day/base"; \
123                         } \
124                         rel2 { \
125                                 relative, 0 \
126                                         (_line / 6 + 1 / 6); \
127                                 to_x, "vl/"#_vert; \
128                                 to_y, "day/base"; \
129                         } \
130                         color, 0 0 0 0; \
131                 } \
132         } \
133         part { name, "db/"#_pos"/img_bg"; \
134                 type, RECT; \
135                 mouse_events, 0; \
136                 description { \
137                         state, "default" 0.0; \
138                         min: WIDTH_OF_BG HEIGHT_OF_BG; \
139                         max: WIDTH_OF_BG HEIGHT_OF_BG; \
140                         fixed: 1 1; \
141                         align: 0.5 0.5; \
142                         rel1 { \
143                                 relative, 0.0 0.0;\
144                                 to_x, "db/"#_pos"/base"; \
145                                 to_y, "db/"#_pos"/base"; \
146                         } \
147                         rel2 { \
148                                 relative, 1.0 1.0;\
149                                 to_x, "db/"#_pos"/base"; \
150                                 to_y, "db/"#_pos"/base"; \
151                         } \
152                         color, 0 0 0 0; \
153                 } \
154         } \
155         part { name, "db/"#_pos"/dim_bg"; \
156                 mouse_events, 0; \
157                 scale, 1; \
158                 description { \
159                         state, "default" 0.0; \
160                         rel1.to, "db/"#_pos"/img_bg"; \
161                         rel2.to, "db/"#_pos"/img_bg"; \
162                         image { \
163                                 normal, CALENDAR_MONTH_VIEW_DIM; \
164                                 border, 3 3 3 3; \
165                                 border_scale,1 ; \
166                         } \
167                         visible, 1; \
168                 } \
169                 description { \
170                         state, "hide" 0.0; \
171                         inherit, "default" 0.0; \
172                         visible, 0; \
173                 } \
174         } \
175         part { name, "db/"#_pos"/today"; \
176                 mouse_events, 0; \
177                 scale, 1; \
178                 description { \
179                         state, "default" 0.0; \
180                         rel1.to, "db/"#_pos"/img_bg"; \
181                         rel2.to, "db/"#_pos"/img_bg"; \
182                         image { \
183                                 normal, CALENDAR_TODAY_ICON; \
184                                 border, 3 3 3 3; \
185                                 border_scale,1 ; \
186                         } \
187                         visible, 0; \
188                 } \
189                 description { \
190                         state, "today" 0.0; \
191                         inherit, "default" 0.0; \
192                         visible, 1; \
193                 } \
194         } \
195         part { name, "db/"#_pos"/sel"; \
196                 mouse_events, 0; \
197                 scale, 1; \
198                 description { \
199                         state, "default" 0.0; \
200                         rel1.to, "db/"#_pos"/img_bg"; \
201                         rel2.to, "db/"#_pos"/img_bg"; \
202                         image { \
203                                 normal, CALENDAR_SELSECTED; \
204                                 border, 3 3 3 3; \
205                                 border_scale,1 ; \
206                         } \
207                         visible, 0; \
208                 } \
209                 description { \
210                         state, "today" 0.0; \
211                         rel1.to, "db/"#_pos"/img_bg"; \
212                         rel2.to, "db/"#_pos"/img_bg"; \
213                         image { \
214                                 normal, CALENDAR_SELSECTED_TODAY; \
215                                 border, 3 3 3 3; \
216                                 border_scale,1 ; \
217                         } \
218                         visible, 1; \
219                 } \
220                 description { \
221                         state, "selected" 0.0; \
222                         inherit, "default" 0.0; \
223                         visible, 1; \
224                 } \
225         } \
226         part { name, "db/"#_pos"/bg"; \
227                 mouse_events, 0; \
228                 scale, 1; \
229                 description { \
230                         state, "default" 0.0; \
231                         rel1.to, "db/"#_pos"/base"; \
232                         rel2 { \
233                                 offset, 0 0; \
234                                 to, "db/"#_pos"/base"; \
235                         } \
236                         image.normal, CALENDAR_WEEK_VIEW_PRESS; \
237                         visible, 0; \
238                 } \
239                 description { \
240                         state, "selected" 0.0; \
241                         inherit, "default" 0.0; \
242                         visible, 1; \
243                 } \
244         } \
245         part { name, "db/"#_pos"/text"; \
246                 type, TEXT; \
247                 mouse_events, 0; \
248                 scale, 1; \
249                 description { \
250                         state, "default" 0.0; \
251                         rel1.to, "db/"#_pos"/base"; \
252                         rel2.to, "db/"#_pos"/base"; \
253                         text { \
254                                 font, "SLP:style=Regular"; \
255                                 size, 52; \
256                                 align, 0.5 0.5; \
257                         } \
258                         color, COLOR_OF_BLOCK_DEFAULT_TEXT_FOR_MONTH_CAL; \
259                 } \
260                 description { \
261                         state, "sunday" 0.0; \
262                         inherit, "default" 0.0; \
263                         color, COLOR_OF_BLOCK_SUNDAY_TEXT_FOR_MONTH_CAL; \
264                 } \
265                 description { \
266                         state, "satday" 0.0; \
267                         inherit, "default" 0.0; \
268                         color, COLOR_OF_BLOCK_SATDAY_TEXT_FOR_MONTH_CAL; \
269                 } \
270                 description { \
271                         state, "disabled" 0.0; \
272                         inherit, "default" 0.0; \
273                         color, COLOR_OF_BLOCK_DISABLEDAY_TEXT_FOR_MONTH_CAL; \
274                 } \
275                 description { \
276                         state, "selected" 0.0; \
277                         inherit, "default" 0.0; \
278                         color, COLOR_OF_BLOCK_SELECTED_TEXT_FOR_MONTH_CAL; \
279                 } \
280                 description { \
281                         state, "today" 0.0; \
282                         inherit, "default" 0.0; \
283                         color, COLOR_OF_BLOCK_SELECTED_TEXT_FOR_MONTH_CAL; \
284                 } \
285         } \
286         part { name, "db/"#_pos"/block"; \
287                 description { \
288                         state, "default" 0.0; \
289                         rel1.to, "db/"#_pos"/base"; \
290                         rel2.to, "db/"#_pos"/base"; \
291                         color, 0 0 0 0; \
292                         visible, 0; \
293                 } \
294                 description { \
295                         state, "disabled" 0.0; \
296                         inherit, "default" 0.0; \
297                         visible, 1; \
298                 } \
299         } \
300         programs { \
301                 program { name, "db/"#_pos"/go_up"; \
302                         signal, "up,"_pos; \
303                         source, "prog"; \
304                         action, STATE_SET "default" 0.0; \
305                         target, "db/"#_pos"/bg"; \
306                 } \
307                 program { name, "db/"#_pos"/down"; \
308                         signal, "mouse,down,1"; \
309                         source, "db/"#_pos"/base"; \
310                         action, SIGNAL_EMIT "dn,"_pos "cal"; \
311                 } \
312                 program { name, "db/"#_pos"/up"; \
313                         signal, "mouse,up,1"; \
314                         source, "db/"#_pos"/base"; \
315                         action, SIGNAL_EMIT "up,"_pos "cal"; \
316                 } \
317                 program { name, "db/"#_pos"/select"; \
318                         signal, "select,"#_pos; \
319                         source, "prog"; \
320                         action, STATE_SET "selected" 0.0; \
321                         target, "db/"#_pos"/sel"; \
322                         target, "db/"#_pos"/text"; \
323                 } \
324                 program { name, "db/"#_pos"/unselect"; \
325                         signal, "unselect,"#_pos; \
326                         source, "prog"; \
327                         action, STATE_SET "default" 0.0; \
328                         target, "db/"#_pos"/sel"; \
329                 } \
330                 program { name, "db/"#_pos"/select_today"; \
331                         signal, "select,today,"#_pos; \
332                         source, "prog"; \
333                         action, STATE_SET "today" 0.0; \
334                         target, "db/"#_pos"/sel"; \
335                         target, "db/"#_pos"/text"; \
336                 } \
337                 program { name, "db/"#_pos"/set_today"; \
338                         signal, "today,"#_pos; \
339                         source, "prog"; \
340                         action, STATE_SET "today" 0.0; \
341                         target, "db/"#_pos"/today"; \
342                 } \
343                 program { name, "db/"#_pos"/unset_today"; \
344                         signal, "notoday,"#_pos; \
345                         source, "prog"; \
346                         action, STATE_SET "default" 0.0; \
347                         target, "db/"#_pos"/today"; \
348                 } \
349                 program { name, "db/"#_pos"/weekday"; \
350                         signal, "weekday,"#_pos; \
351                         source, "prog"; \
352                         action, STATE_SET "default" 0.0; \
353                         target, "db/"#_pos"/text"; \
354                 } \
355                 program { name, "db/"#_pos"/sunday"; \
356                         signal, "sunday,"#_pos; \
357                         source, "prog"; \
358                         action, STATE_SET "sunday" 0.0; \
359                         target, "db/"#_pos"/text"; \
360                 } \
361                 program { name, "db/"#_pos"/satday"; \
362                         signal, "satday,"#_pos; \
363                         source, "prog"; \
364                         action, STATE_SET "satday" 0.0; \
365                         target, "db/"#_pos"/text"; \
366                 } \
367                 program { name, "db/"#_pos"/disable"; \
368                         signal, "disable,"#_pos; \
369                         source, "prog"; \
370                         action, STATE_SET "disabled" 0.0; \
371                         target, "db/"#_pos"/text"; \
372                         target, "db/"#_pos"/block"; \
373                 } \
374                 program { name, "db/"#_pos"/enable"; \
375                         signal, "enable,"#_pos; \
376                         source, "prog"; \
377                         action, STATE_SET "default" 0.0; \
378                         target, "db/"#_pos"/block"; \
379                 } \
380                 program { name, "db/"#_pos"/show_count"; \
381                         signal, "show_count,"#_pos; \
382                         source, "prog"; \
383                         action, STATE_SET "default" 0.0; \
384                         target, "db/"#_pos"/dim_bg"; \
385                 } \
386                 program { name, "db/"#_pos"/hide_count"; \
387                         signal, "hide_count,"#_pos; \
388                         source, "prog"; \
389                         action, STATE_SET "hide" 0.0; \
390                         target, "db/"#_pos"/dim_bg"; \
391                 } \
392         }
393
394 // vertical line
395 #define VL(_pos) \
396         part { name, "vl/"#_pos; \
397                 type, RECT; \
398                 description { \
399                         state, "default" 0.0; \
400                         rel1 { \
401                                 relative, (_pos / 7) 0; \
402                                 offset, 0 -1; \
403                                 to, "day/base"; \
404                         } \
405                         rel2 { \
406                                 relative, (_pos / 7) 1; \
407                                 offset, 0 -1; \
408                                 to, "day/base"; \
409                         } \
410                         color, 0 0 0 0; \
411                 } \
412         }
413
414 #define VL_W(_pos) \
415         part { name, "vl_w/"#_pos; \
416                 type, RECT; \
417                 description { \
418                         state, "default" 0.0; \
419                         rel1 { \
420                                 relative, (_pos / 7) 0; \
421                                 offset, 0 -1; \
422                                 to, "wday/base"; \
423                         } \
424                         rel2 { \
425                                 relative, (_pos / 7) 1; \
426                                 offset, 0 -1; \
427                                 to, "wday/base"; \
428                         } \
429                         color, 0 0 0 0; \
430                 } \
431         }
432
433 // horizontal line
434 #define HL(_pos) \
435         part { name, "hl/"#_pos; \
436                 type, RECT; \
437                 description { \
438                         state, "default" 0.0; \
439                         rel1 { \
440                                 relative, 0 (_pos / 6); \
441                                 to, "day/base"; \
442                         } \
443                         rel2 { \
444                                 relative, 1 (_pos / 6); \
445                                 offset, -1 0; \
446                                 to, "day/base"; \
447                         } \
448                         color, 0 0 0 0; \
449                 } \
450         }
451
452 #define WNHL(_pos) \
453         part { name, "weeknumber/hl/"#_pos; \
454                 type, RECT; \
455                 description { \
456                         state, "default" 0.0; \
457                         rel1 { \
458                                 relative, 0 (_pos / 6); \
459                                 to, "weeknumber/day/base"; \
460                         } \
461                         rel2 { \
462                                 relative, 1 (_pos / 6); \
463                                 offset, -1 0; \
464                                 to, "weeknumber/day/base"; \
465                         } \
466                         color, 0 0 0 0; \
467                 } \
468         }
469
470 #define WNUMBER(_line) \
471         part { name, "wn/"#_line"/base"; \
472                 type, RECT; \
473                 ignore_flags, ON_HOLD; \
474                 description { \
475                         state, "default" 0.0; \
476                         rel1 { \
477                                 relative, 0 \
478                                         (_line / 6); \
479                                 to_x, "weeknumber/day/base"; \
480                                 to_y, "weeknumber/day/base"; \
481                         } \
482                         rel2 { \
483                                 relative, 1 \
484                                         (_line / 6 + 1 / 6); \
485                                 to_x, "weeknumber/day/base"; \
486                                 to_y, "weeknumber/day/base"; \
487                         } \
488                         color, 0 0 0 0; \
489                 } \
490         } \
491         part { name, "wn/"#_line"/text_rect"; \
492                 type, RECT; \
493                 mouse_events, 0; \
494                 description { \
495                         state, "default" 0.0; \
496                         rel1.to, "wn/"#_line"/base"; \
497                         rel2 { \
498                                 relative, 1 1; \
499                                 to, "wn/"#_line"/base"; \
500                         } \
501                         visible, 0; \
502                 } \
503         } \
504         part { name, "wn/"#_line"/text"; \
505                 type, TEXT; \
506                 mouse_events, 0; \
507                 scale, 1; \
508                 description { \
509                         state, "default" 0.0; \
510                         rel1.to, "wn/"#_line"/text_rect"; \
511                         rel2.to, "wn/"#_line"/text_rect"; \
512                         text { \
513                                 font, "SLP:style=Regular"; \
514                                 size, 32; \
515                                 align, 0.5 0.5; \
516                         } \
517                         color, COLOR_OF_WEEK_NUMBER_TEXT_FOR_MONTH_CAL; \
518                 } \
519         }
520
521 group { name, "main/month/cal";
522         script {
523               public edge_timer;
524               public timer2(val) {
525                  emit("do-hide-vshadow", "");
526                  set_int(edge_timer, 0);
527                  return 0;
528               }
529         }
530         images {
531                 image, CALENDAR_SELSECTED COMP;
532                 image, CALENDAR_WEEK_VIEW_PRESS COMP;
533                 image, CALENDAR_MONTH_VIEW_BG_1 COMP;
534                 image, CALENDAR_TODAY_ICON COMP;
535                 image, CALENDAR_MONTH_VIEW_DIM COMP;
536                 image, CALENDAR_SELSECTED_TODAY COMP;
537                 image: "00_overscrolling_left.png" COMP;
538                 image: "00_overscrolling_right.png" COMP;
539         }
540
541         parts {
542                 part { name, "base";
543                         type, RECT;
544                         description {
545                                 state, "default" 0.0;
546                                 color, 0 0 0 0;
547                         }
548                 }
549                 part { name, "weeknumber/wday/base";
550                         type, RECT;
551                         description {
552                                 state, "default" 0.0;
553                                 rel1 { relative, 0.0 0.0; to, "base"; }
554                                 rel2 { relative, 0.0 0.0; to, "base"; }
555                                 color, 0 0 0 0;
556                         }
557                         description {
558                                 state, "default" 0.1;
559                                 min, WIDTH_OF_WNUMBER 0;
560                                 fixed, 1 0;
561                                 align, 0 0;
562                                 rel1 { relative, 0.0 (0/HEIGHT_OF_CALENDAR_SW); to, "base"; }
563                                 rel2 { relative, 0.0 (HEIGHT_OF_WDAY+HEIGHT_OF_WDAY_LINE)/HEIGHT_OF_CALENDAR_SW; to, "base"; }
564                                 color, 0 0 0 0;
565                         }
566                 }
567                 part { name, "weeknumber/day/base";
568                         type, RECT;
569                         description {
570                                 state, "default" 0.0;
571                                 rel1 { relative, 0.0 0.0; to, "base"; }
572                                 rel2 { relative, 0.0 0.0; to, "base"; }
573                                 color, 0 0 0 0;
574                         }
575                         description {
576                                 state, "default" 0.1;
577                                 min, WIDTH_OF_WNUMBER 0;
578                                 fixed, 1 0;
579                                 align, 0 0;
580                                 rel1 { relative, 0.0 (HEIGHT_OF_WDAY+HEIGHT_OF_WDAY_LINE)/HEIGHT_OF_CALENDAR_SW; to, "base"; }
581                                 rel2 { relative, 0.0 HEIGHT_OF_CALENDAR_SW/HEIGHT_OF_CALENDAR_SW; to, "base"; }
582                                 color, 0 0 0 0;
583                         }
584                 }
585                 part { name, "weeknumber/wday/line";
586                         type, RECT;
587                         description {
588                                 state, "default" 0.0;
589                                 rel1 { relative, 0.0 1.0; offset, 0 (-1.0*HEIGHT_OF_WDAY_LINE); to, "weeknumber/wday/base"; }
590                                 rel2 { relative, 1.0 1.0; to, "weeknumber/wday/base"; }
591                                 color, COLOR_OF_LINE_FOR_MONTH_CAL;
592                         }
593                 }
594
595                 part { name, "wday/weeknumber/base";
596                         type, RECT;
597                         description {
598                                 state, "default" 0.0;
599                                 rel1 {
600                                         relative: 0 0;
601                                         to, "weeknumber/wday/base";
602                                 }
603                                 rel2 {
604                                         relative: 1 1;
605                                         to, "weeknumber/wday/base";
606                                 }
607                                 color, 0 0 0 0;
608                         }
609                 }
610
611                 part { name, "wday/weeknumber/text";
612                         type, TEXT;
613                         mouse_events, 0;
614                         scale, 1;
615                         description {
616                                 state, "default" 0.0;
617                                 rel1.to, "wday/weeknumber/base";
618                                 rel2.to, "wday/weeknumber/base";
619                                 color, COLOR_OF_WEEK_NUMBER_TEXT_FOR_MONTH_CAL;
620                                 text {
621                                         font, "SLP:style=Regular";
622                                         size, 24;
623                                         align, 0.5 0.5;
624                                 }
625                         }
626                 }
627
628                 WNUMBER(0) WNUMBER(1) WNUMBER(2) WNUMBER(3) WNUMBER(4) WNUMBER(5)
629
630                 WNHL(0) WNHL(1) WNHL(2) WNHL(3) WNHL(4) WNHL(5) WNHL(6)
631
632                 programs {
633                         program { name, "display_week_number";
634                                 signal, "display_week_number";
635                                 source, "prog";
636                                 action, STATE_SET "default" 0.1;
637                                 target, "weeknumber/wday/base";
638                                 target, "weeknumber/day/base";
639                         }
640                 }
641                 part { name, "wday/base";
642                         type, RECT;
643                         description {
644                                 state, "default" 0.0;
645                                 rel1 { relative, 1.0 (0/HEIGHT_OF_CALENDAR_SW);  to_x, "weeknumber/wday/base"; to_y, "base"; }
646                                 rel2 { relative, 1.0 (HEIGHT_OF_WDAY+HEIGHT_OF_WDAY_LINE)/HEIGHT_OF_CALENDAR_SW; to, "base"; }
647                                 color, 0 0 0 0;
648                         }
649                 }
650                 part { name, "day/base";
651                         type, RECT;
652                         description {
653                                 state, "default" 0.0;
654                                 rel1 { relative, 1.0 (HEIGHT_OF_WDAY+HEIGHT_OF_WDAY_LINE)/HEIGHT_OF_CALENDAR_SW;  to_x, "weeknumber/day/base"; to_y, "base";}
655                                 rel2 { relative, 1.0 HEIGHT_OF_CALENDAR_SW/HEIGHT_OF_CALENDAR_SW; to, "base"; }
656                                 color, 0 0 0 0;
657                         }
658                 }
659                 part { name, "wday/line";
660                         type, RECT;
661                         description {
662                                 state, "default" 0.0;
663                                 rel1 { relative, 0.0 1.0; offset, 0 (-1.0*HEIGHT_OF_WDAY_LINE); to, "wday/base"; }
664                                 rel2 { relative, 1.0 1.0; to, "wday/base"; }
665                                 color, COLOR_OF_LINE_FOR_MONTH_CAL;
666                         }
667                 }
668
669                 WD(0) WD(1) WD(2) WD(3) WD(4) WD(5) WD(6)
670                 VL_W( 1) VL_W( 2) VL_W( 3) VL_W( 4) VL_W( 5) VL_W( 6) VL_W(7)
671
672                 DB(0,  0, 1) DB(0,  1, 2) DB(0,  2, 3) DB(0,  3, 4) DB(0,  4, 5) DB(0,  5, 6) DB(0,  6, 7)
673                 DB(1,  7, 1) DB(1,  8, 2) DB(1,  9, 3) DB(1, 10, 4) DB(1, 11, 5) DB(1, 12, 6) DB(1, 13, 7)
674                 DB(2, 14, 1) DB(2, 15, 2) DB(2, 16, 3) DB(2, 17, 4) DB(2, 18, 5) DB(2, 19, 6) DB(2, 20, 7)
675                 DB(3, 21, 1) DB(3, 22, 2) DB(3, 23, 3) DB(3, 24, 4) DB(3, 25, 5) DB(3, 26, 6) DB(3, 27, 7)
676                 DB(4, 28, 1) DB(4, 29, 2) DB(4, 30, 3) DB(4, 31, 4) DB(4, 32, 5) DB(4, 33, 6) DB(4, 34, 7)
677                 DB(5, 35, 1) DB(5, 36, 2) DB(5, 37, 3) DB(5, 38, 4) DB(5, 39, 5) DB(5, 40, 6) DB(5, 41, 7)
678
679                 VL( 1) VL( 2) VL( 3) VL( 4) VL( 5) VL( 6) VL(7)
680                 HL( 0) HL( 1) HL( 2) HL( 3) HL( 4) HL( 5) HL(6)
681
682                 part { name: "vshadow_clip";
683                  type: RECT;
684                  mouse_events: 0;
685                   repeat_events: 1;
686                  scale: 1;
687                  description { state: "default" 0.0;
688                  }
689                  description { state: "hidden" 0.0;
690                     visible: 0;
691                     color: 255 255 255 0;
692                  }
693               }
694               part { name: "shadow_right";
695                  insert_after: "vshadow_clip";
696                   repeat_events: 1;
697                  clip_to: "vshadow_clip";
698                  type: IMAGE;
699                  scale: 1;
700                  description { state: "default" 0.0;
701                     min: 10 0;
702                     fixed: 1 1;
703                     align: 1.0 0.5;
704                     color: 255 255 255 150;
705                     rel1.relative: 1.0 0.0;
706                     rel2.relative: 1.0 1.0;
707                     rel1.to: "base";
708                     rel2.to: "base";
709                     image.normal: "00_overscrolling_right.png";
710                      visible: 1;
711                  }
712                  description { state: "edge_right" 0.0;
713                     inherit: "default" 0.0;
714                     color: 255 255 255 255;
715                      visible: 1;
716                  }
717                  description { state: "edge_left" 0.0;
718                     inherit: "default" 0.0;
719                     color: 255 255 255 50;
720                      visible: 1;
721                  }
722               }
723               part { name: "shadow_left";
724                  insert_after: "shadow_right";
725                   repeat_events: 1;
726                  clip_to: "vshadow_clip";
727                  type: IMAGE;
728                  scale: 1;
729                  description { state: "default" 0.0;
730                     min: 10 0;
731                     fixed: 1 1;
732                     align: 0.0 0.5;
733                     color: 255 255 255 150;
734                     rel1.relative: 0.0 0.0;
735                     rel2.relative: 0.0 1.0;
736                     rel1.to: "base";
737                     rel2.to: "base";
738                     image.normal: "00_overscrolling_left.png";
739                      visible: 1;
740                  }
741                  description { state: "edge_right" 0.0;
742                     inherit: "default" 0.0;
743                     color: 255 255 255 50;
744                       visible: 1;
745                  }
746                  description { state: "edge_left" 0.0;
747                     inherit: "default" 0.0;
748                     color: 255 255 255 255;
749                      visible: 1;
750                  }
751               }
752         }
753         programs {
754                 program { name: "load";
755                   signal: "load";
756                  script {
757                     set_state(PART:"vshadow_clip", "hidden", 0.0);
758                     set_int(edge_timer, 0);
759                  }
760               }
761                 program { name: "vshadow_show";
762                  signal: "do-show-vshadow";
763                  source: "";
764                  action:  STATE_SET "default" 0.0;
765                  transition: LINEAR 0.5;
766                  target: "vshadow_clip";
767               }
768               program { name: "vshadow_hide";
769                  signal: "do-hide-vshadow";
770                  source: "";
771                  action:  STATE_SET "hidden" 0.0;
772                  transition: LINEAR 0.5;
773                  target: "vshadow_clip";
774               }
775
776                 program { name: "edge_right";
777                  signal: "elm,edge,right";
778                  source: "elm";
779                  script {
780                     new v;
781                     set_state(PART:"shadow_right", "edge_right", 0.0);
782                     set_state(PART:"shadow_left", "edge_right", 0.0);
783                     v = get_int(edge_timer);
784                     if (!v) {
785                         emit("do-show-vshadow", "");
786                     }
787                     if (v > 0) cancel_timer(v);
788                     v = timer(0.2, "timer2", 0);
789                     set_int(edge_timer, v);
790                  }
791               }
792               program { name: "edge_left";
793                  signal: "elm,edge,left";
794                  source: "elm";
795                  script {
796                     new v;
797                     set_state(PART:"shadow_right", "edge_left", 0.0);
798                     set_state(PART:"shadow_left", "edge_left", 0.0);
799                     v = get_int(edge_timer);
800                     if (!v) {
801                         emit("do-show-vshadow", "");
802                     }
803                     if (v > 0) cancel_timer(v);
804                     v = timer(0.2, "timer2", 0);
805                     set_int(edge_timer, v);
806                  }
807               }
808         }
809 }