3 * Copyright 2012 Samsung Electronics Co., Ltd
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
9 * http://floralicense.org/license/
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.
23 #define R_X (480.0/720.0)
24 #define R_Y (800.0/1280.0)
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)
34 #define WIDTH_OF_DAY (102*R_X)
35 #define WDAY_LEFT_OFFSET (8*R_X)
36 #define DAY_LEFT_OFFSET (10*R_X)
38 #define WIDTH_OF_BG (100)
39 #define HEIGHT_OF_BG (100)
41 #define WIDTH_OF_BG_L (58)
42 #define HEIGHT_OF_BG_L (58)
44 #define WIDTH_OF_WNUMBER (48)
45 #define WIDTH_OF_WNUMBER_L (38)
48 part { name, "wday/"#_pos"/base"; \
51 state, "default" 0.0; \
53 relative: (_pos % 7 / 7) 0; \
57 relative: (_pos % 7 / 7 + 1 / 7) 1; \
63 part { name, "wday/"#_pos"/text"; \
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; \
73 font, "SLP:style=Medium"; \
79 state, "sunday" 0.0; \
80 inherit, "default" 0.0; \
81 color, COLOR_OF_SUNDAY_TEXT_FOR_MONTH_CAL; \
84 state, "satday" 0.0; \
85 inherit, "default" 0.0; \
86 color, COLOR_OF_SATDAY_TEXT_FOR_MONTH_CAL; \
90 program { name, "wday/"#_pos"/weekday"; \
91 signal, "weekday,"#_pos; \
93 action, STATE_SET "default" 0.0; \
94 target, "wday/"#_pos"/text"; \
96 program { name, "wday/"#_pos"/sunday"; \
97 signal, "sunday,"#_pos; \
99 action, STATE_SET "sunday" 0.0; \
100 target, "wday/"#_pos"/text"; \
102 program { name, "wday/"#_pos"/satday"; \
103 signal, "satday,"#_pos; \
105 action, STATE_SET "satday" 0.0; \
106 target, "wday/"#_pos"/text"; \
112 #define DB(_line, _pos, _vert) \
113 part { name, "db/"#_pos"/base"; \
115 ignore_flags, ON_HOLD; \
117 state, "default" 0.0; \
119 relative, (_pos % 7 / 7) \
126 (_line / 6 + 1 / 6); \
133 part { name, "db/"#_pos"/img_bg"; \
137 state, "default" 0.0; \
138 min: WIDTH_OF_BG HEIGHT_OF_BG; \
139 max: WIDTH_OF_BG HEIGHT_OF_BG; \
144 to_x, "db/"#_pos"/base"; \
145 to_y, "db/"#_pos"/base"; \
149 to_x, "db/"#_pos"/base"; \
150 to_y, "db/"#_pos"/base"; \
155 part { name, "db/"#_pos"/dim_bg"; \
159 state, "default" 0.0; \
160 rel1.to, "db/"#_pos"/img_bg"; \
161 rel2.to, "db/"#_pos"/img_bg"; \
163 normal, CALENDAR_MONTH_VIEW_DIM; \
171 inherit, "default" 0.0; \
175 part { name, "db/"#_pos"/today"; \
179 state, "default" 0.0; \
180 rel1.to, "db/"#_pos"/img_bg"; \
181 rel2.to, "db/"#_pos"/img_bg"; \
183 normal, CALENDAR_TODAY_ICON; \
190 state, "today" 0.0; \
191 inherit, "default" 0.0; \
195 part { name, "db/"#_pos"/sel"; \
199 state, "default" 0.0; \
200 rel1.to, "db/"#_pos"/img_bg"; \
201 rel2.to, "db/"#_pos"/img_bg"; \
203 normal, CALENDAR_SELSECTED; \
210 state, "today" 0.0; \
211 rel1.to, "db/"#_pos"/img_bg"; \
212 rel2.to, "db/"#_pos"/img_bg"; \
214 normal, CALENDAR_SELSECTED_TODAY; \
221 state, "selected" 0.0; \
222 inherit, "default" 0.0; \
226 part { name, "db/"#_pos"/bg"; \
230 state, "default" 0.0; \
231 rel1.to, "db/"#_pos"/base"; \
234 to, "db/"#_pos"/base"; \
236 image.normal, CALENDAR_WEEK_VIEW_PRESS; \
240 state, "selected" 0.0; \
241 inherit, "default" 0.0; \
245 part { name, "db/"#_pos"/text"; \
250 state, "default" 0.0; \
251 rel1.to, "db/"#_pos"/base"; \
252 rel2.to, "db/"#_pos"/base"; \
254 font, "SLP:style=Regular"; \
258 color, COLOR_OF_BLOCK_DEFAULT_TEXT_FOR_MONTH_CAL; \
261 state, "sunday" 0.0; \
262 inherit, "default" 0.0; \
263 color, COLOR_OF_BLOCK_SUNDAY_TEXT_FOR_MONTH_CAL; \
266 state, "satday" 0.0; \
267 inherit, "default" 0.0; \
268 color, COLOR_OF_BLOCK_SATDAY_TEXT_FOR_MONTH_CAL; \
271 state, "disabled" 0.0; \
272 inherit, "default" 0.0; \
273 color, COLOR_OF_BLOCK_DISABLEDAY_TEXT_FOR_MONTH_CAL; \
276 state, "selected" 0.0; \
277 inherit, "default" 0.0; \
278 color, COLOR_OF_BLOCK_SELECTED_TEXT_FOR_MONTH_CAL; \
281 state, "today" 0.0; \
282 inherit, "default" 0.0; \
283 color, COLOR_OF_BLOCK_SELECTED_TEXT_FOR_MONTH_CAL; \
286 part { name, "db/"#_pos"/block"; \
288 state, "default" 0.0; \
289 rel1.to, "db/"#_pos"/base"; \
290 rel2.to, "db/"#_pos"/base"; \
295 state, "disabled" 0.0; \
296 inherit, "default" 0.0; \
301 program { name, "db/"#_pos"/go_up"; \
304 action, STATE_SET "default" 0.0; \
305 target, "db/"#_pos"/bg"; \
307 program { name, "db/"#_pos"/down"; \
308 signal, "mouse,down,1"; \
309 source, "db/"#_pos"/base"; \
310 action, SIGNAL_EMIT "dn,"_pos "cal"; \
312 program { name, "db/"#_pos"/up"; \
313 signal, "mouse,up,1"; \
314 source, "db/"#_pos"/base"; \
315 action, SIGNAL_EMIT "up,"_pos "cal"; \
317 program { name, "db/"#_pos"/select"; \
318 signal, "select,"#_pos; \
320 action, STATE_SET "selected" 0.0; \
321 target, "db/"#_pos"/sel"; \
322 target, "db/"#_pos"/text"; \
324 program { name, "db/"#_pos"/unselect"; \
325 signal, "unselect,"#_pos; \
327 action, STATE_SET "default" 0.0; \
328 target, "db/"#_pos"/sel"; \
330 program { name, "db/"#_pos"/select_today"; \
331 signal, "select,today,"#_pos; \
333 action, STATE_SET "today" 0.0; \
334 target, "db/"#_pos"/sel"; \
335 target, "db/"#_pos"/text"; \
337 program { name, "db/"#_pos"/set_today"; \
338 signal, "today,"#_pos; \
340 action, STATE_SET "today" 0.0; \
341 target, "db/"#_pos"/today"; \
343 program { name, "db/"#_pos"/unset_today"; \
344 signal, "notoday,"#_pos; \
346 action, STATE_SET "default" 0.0; \
347 target, "db/"#_pos"/today"; \
349 program { name, "db/"#_pos"/weekday"; \
350 signal, "weekday,"#_pos; \
352 action, STATE_SET "default" 0.0; \
353 target, "db/"#_pos"/text"; \
355 program { name, "db/"#_pos"/sunday"; \
356 signal, "sunday,"#_pos; \
358 action, STATE_SET "sunday" 0.0; \
359 target, "db/"#_pos"/text"; \
361 program { name, "db/"#_pos"/satday"; \
362 signal, "satday,"#_pos; \
364 action, STATE_SET "satday" 0.0; \
365 target, "db/"#_pos"/text"; \
367 program { name, "db/"#_pos"/disable"; \
368 signal, "disable,"#_pos; \
370 action, STATE_SET "disabled" 0.0; \
371 target, "db/"#_pos"/text"; \
372 target, "db/"#_pos"/block"; \
374 program { name, "db/"#_pos"/enable"; \
375 signal, "enable,"#_pos; \
377 action, STATE_SET "default" 0.0; \
378 target, "db/"#_pos"/block"; \
380 program { name, "db/"#_pos"/show_count"; \
381 signal, "show_count,"#_pos; \
383 action, STATE_SET "default" 0.0; \
384 target, "db/"#_pos"/dim_bg"; \
386 program { name, "db/"#_pos"/hide_count"; \
387 signal, "hide_count,"#_pos; \
389 action, STATE_SET "hide" 0.0; \
390 target, "db/"#_pos"/dim_bg"; \
396 part { name, "vl/"#_pos; \
399 state, "default" 0.0; \
401 relative, (_pos / 7) 0; \
406 relative, (_pos / 7) 1; \
415 part { name, "vl_w/"#_pos; \
418 state, "default" 0.0; \
420 relative, (_pos / 7) 0; \
425 relative, (_pos / 7) 1; \
435 part { name, "hl/"#_pos; \
438 state, "default" 0.0; \
440 relative, 0 (_pos / 6); \
444 relative, 1 (_pos / 6); \
453 part { name, "weeknumber/hl/"#_pos; \
456 state, "default" 0.0; \
458 relative, 0 (_pos / 6); \
459 to, "weeknumber/day/base"; \
462 relative, 1 (_pos / 6); \
464 to, "weeknumber/day/base"; \
470 #define WNUMBER(_line) \
471 part { name, "wn/"#_line"/base"; \
473 ignore_flags, ON_HOLD; \
475 state, "default" 0.0; \
479 to_x, "weeknumber/day/base"; \
480 to_y, "weeknumber/day/base"; \
484 (_line / 6 + 1 / 6); \
485 to_x, "weeknumber/day/base"; \
486 to_y, "weeknumber/day/base"; \
491 part { name, "wn/"#_line"/text_rect"; \
495 state, "default" 0.0; \
496 rel1.to, "wn/"#_line"/base"; \
499 to, "wn/"#_line"/base"; \
504 part { name, "wn/"#_line"/text"; \
509 state, "default" 0.0; \
510 rel1.to, "wn/"#_line"/text_rect"; \
511 rel2.to, "wn/"#_line"/text_rect"; \
513 font, "SLP:style=Regular"; \
517 color, COLOR_OF_WEEK_NUMBER_TEXT_FOR_MONTH_CAL; \
521 group { name, "main/month/cal";
525 emit("do-hide-vshadow", "");
526 set_int(edge_timer, 0);
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;
545 state, "default" 0.0;
549 part { name, "weeknumber/wday/base";
552 state, "default" 0.0;
553 rel1 { relative, 0.0 0.0; to, "base"; }
554 rel2 { relative, 0.0 0.0; to, "base"; }
558 state, "default" 0.1;
559 min, WIDTH_OF_WNUMBER 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"; }
567 part { name, "weeknumber/day/base";
570 state, "default" 0.0;
571 rel1 { relative, 0.0 0.0; to, "base"; }
572 rel2 { relative, 0.0 0.0; to, "base"; }
576 state, "default" 0.1;
577 min, WIDTH_OF_WNUMBER 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"; }
585 part { name, "weeknumber/wday/line";
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;
595 part { name, "wday/weeknumber/base";
598 state, "default" 0.0;
601 to, "weeknumber/wday/base";
605 to, "weeknumber/wday/base";
611 part { name, "wday/weeknumber/text";
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;
621 font, "SLP:style=Regular";
628 WNUMBER(0) WNUMBER(1) WNUMBER(2) WNUMBER(3) WNUMBER(4) WNUMBER(5)
630 WNHL(0) WNHL(1) WNHL(2) WNHL(3) WNHL(4) WNHL(5) WNHL(6)
633 program { name, "display_week_number";
634 signal, "display_week_number";
636 action, STATE_SET "default" 0.1;
637 target, "weeknumber/wday/base";
638 target, "weeknumber/day/base";
641 part { name, "wday/base";
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"; }
650 part { name, "day/base";
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"; }
659 part { name, "wday/line";
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;
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)
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)
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)
682 part { name: "vshadow_clip";
687 description { state: "default" 0.0;
689 description { state: "hidden" 0.0;
691 color: 255 255 255 0;
694 part { name: "shadow_right";
695 insert_after: "vshadow_clip";
697 clip_to: "vshadow_clip";
700 description { state: "default" 0.0;
704 color: 255 255 255 150;
705 rel1.relative: 1.0 0.0;
706 rel2.relative: 1.0 1.0;
709 image.normal: "00_overscrolling_right.png";
712 description { state: "edge_right" 0.0;
713 inherit: "default" 0.0;
714 color: 255 255 255 255;
717 description { state: "edge_left" 0.0;
718 inherit: "default" 0.0;
719 color: 255 255 255 50;
723 part { name: "shadow_left";
724 insert_after: "shadow_right";
726 clip_to: "vshadow_clip";
729 description { state: "default" 0.0;
733 color: 255 255 255 150;
734 rel1.relative: 0.0 0.0;
735 rel2.relative: 0.0 1.0;
738 image.normal: "00_overscrolling_left.png";
741 description { state: "edge_right" 0.0;
742 inherit: "default" 0.0;
743 color: 255 255 255 50;
746 description { state: "edge_left" 0.0;
747 inherit: "default" 0.0;
748 color: 255 255 255 255;
754 program { name: "load";
757 set_state(PART:"vshadow_clip", "hidden", 0.0);
758 set_int(edge_timer, 0);
761 program { name: "vshadow_show";
762 signal: "do-show-vshadow";
764 action: STATE_SET "default" 0.0;
765 transition: LINEAR 0.5;
766 target: "vshadow_clip";
768 program { name: "vshadow_hide";
769 signal: "do-hide-vshadow";
771 action: STATE_SET "hidden" 0.0;
772 transition: LINEAR 0.5;
773 target: "vshadow_clip";
776 program { name: "edge_right";
777 signal: "elm,edge,right";
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);
785 emit("do-show-vshadow", "");
787 if (v > 0) cancel_timer(v);
788 v = timer(0.2, "timer2", 0);
789 set_int(edge_timer, v);
792 program { name: "edge_left";
793 signal: "elm,edge,left";
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);
801 emit("do-show-vshadow", "");
803 if (v > 0) cancel_timer(v);
804 v = timer(0.2, "timer2", 0);
805 set_int(edge_timer, v);