8df778a952d2218c09defd1b2fbd96fd7fb691cb
[apps/core/preloaded/calendar.git] / data / edc / layout / inc.main.year.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 // day block in year
19 #define SDB(_pos) \
20         part { name, "sdb/"#_pos"/base"; \
21                 type, RECT; \
22                 description { \
23                         state, "default" 0.0; \
24                         rel1 { \
25                                 relative, (_pos % 7 / 7) \
26                                         (_pos / 7 / 6 - _pos % 7 / 7 / 6); \
27                                 to, "sdb/base"; \
28                         } \
29                         rel2 { \
30                                 relative, (_pos % 7 / 7 + 1 / 7) \
31                                         (_pos / 7 / 6 - _pos % 7 / 7 / 6 + 1 / 6); \
32                                 to, "sdb/base"; \
33                         } \
34                         color, 0 0 0 0; \
35                 } \
36         } \
37         part { name, "sdb/"#_pos"/today"; \
38                 mouse_events, 0; \
39                 scale, 1; \
40                 description { \
41                         state, "default" 0.0; \
42                         min, 26 26; \
43                         max, 26 26; \
44                         fixed, 1 1; \
45                         align, 0.5 0.5; \
46                         rel1 { \
47                           relative: 0.0 0.0; \
48                           to_x: "sdb/"#_pos"/base"; \
49                           to_y: "sdb/"#_pos"/base"; \
50                         } \
51                         rel2 { \
52                           relative: 1.0 1.0; \
53                           to_x: "sdb/"#_pos"/base"; \
54                           to_y: "sdb/"#_pos"/base"; \
55                         } \
56                         image { \
57                                 normal, CALENDAR_YEAR_DAY_SELSECTED; \
58                                 border, 3 3 3 3; \
59                                 border_scale, 1; \
60                         } \
61                         visible, 0; \
62                 } \
63                 description { \
64                         state, "today" 0.0; \
65                         inherit, "default" 0.0; \
66                         visible, 1; \
67                 } \
68         } \
69         part { name, "sdb/"#_pos"/text"; \
70                 type, TEXT; \
71                 mouse_events, 0; \
72                 scale, 1; \
73                 description { \
74                         state, "default" 0.0; \
75                         rel1.to, "sdb/"#_pos"/base"; \
76                         rel2.to, "sdb/"#_pos"/base"; \
77                         text { \
78                                 font, "SLP:style=Medium"; \
79                                 size, 15; \
80                                 align, 0.5 0.5; \
81                         } \
82                         color, COLOR_OF_DEFAULT_TEXT_FOR_YEAR_CAL; \
83                 } \
84                 description { \
85                         state, "sunday" 0.0; \
86                         inherit, "default" 0.0; \
87                         color, COLOR_OF_SUNDAY_TEXT_FOR_YEAR_CAL; \
88                 } \
89                 description { \
90                         state, "satday" 0.0; \
91                         inherit, "default" 0.0; \
92                         color, COLOR_OF_SATDAY_TEXT_FOR_YEAR_CAL; \
93                 } \
94                 description { \
95                         state, "today" 0.0; \
96                         inherit, "default" 0.0; \
97                         color, COLOR_OF_TODAY_FOR_YEAR_CAL; \
98                 } \
99         } \
100         programs { \
101                 program { name, "sdb/"#_pos"/weekday"; \
102                         signal, "weekday,"#_pos; \
103                         source, "prog"; \
104                         action, STATE_SET "default" 0.0; \
105                         target, "sdb/"#_pos"/text"; \
106                 } \
107                 program { name, "sdb/"#_pos"/sunday"; \
108                         signal, "sunday,"#_pos; \
109                         source, "prog"; \
110                         action, STATE_SET "sunday" 0.0; \
111                         target, "sdb/"#_pos"/text"; \
112                 } \
113                 program { name, "sdb/"#_pos"/satday"; \
114                         signal, "satday,"#_pos; \
115                         source, "prog"; \
116                         action, STATE_SET "satday" 0.0; \
117                         target, "sdb/"#_pos"/text"; \
118                 } \
119                 program { name, "sdb/"#_pos"/set_today"; \
120                         signal, "today,"#_pos; \
121                         source, "prog"; \
122                         action, STATE_SET "today" 0.0; \
123                         target, "sdb/"#_pos"/today"; \
124                         target, "sdb/"#_pos"/text";\
125                 } \
126         }
127
128 // day block header in year
129 #define SDH(_pos) \
130         part { name, "sdh/"#_pos"/base"; \
131                 type, RECT; \
132                 description { \
133                         state, "default" 0.0; \
134                         rel1 { \
135                                 relative, (_pos % 7 / 7) 0.0; \
136                                 to, "sdh/base"; \
137                         } \
138                         rel2 { \
139                                 relative, (_pos % 7 / 7 + 1 / 7) 1.0; \
140                                 to, "sdh/base"; \
141                         } \
142                         color, 0 0 0 0; \
143                 } \
144         } \
145         part { name, "sdh/"#_pos"/text"; \
146                 type, TEXT; \
147                 mouse_events, 0; \
148                 scale, 1; \
149                 description { \
150                         state, "default" 0.0; \
151                         rel1.to, "sdh/"#_pos"/base"; \
152                         rel2.to, "sdh/"#_pos"/base"; \
153                         text { \
154                                 font, "SLP:style=Medium"; \
155                                 size, 12; \
156                                 align, 0.5 0.5; \
157                         } \
158                         color, COLOR_OF_DEFAULT_TEXT_FOR_YEAR_CAL; \
159                 } \
160                 description { \
161                         state, "sunday" 0.0; \
162                         inherit, "default" 0.0; \
163                         color, COLOR_OF_SUNDAY_TEXT_FOR_YEAR_CAL; \
164                 } \
165                 description { \
166                         state, "satday" 0.0; \
167                         inherit, "default" 0.0; \
168                         color, COLOR_OF_SATDAY_TEXT_FOR_YEAR_CAL; \
169                 } \
170         } \
171         programs { \
172                 program { name, "sdh/"#_pos"/weekday"; \
173                         signal, "weekday,"#_pos; \
174                         source, "prog"; \
175                         action, STATE_SET "default" 0.0; \
176                         target, "sdh/"#_pos"/text"; \
177                 } \
178                 program { name, "sdh/"#_pos"/sunday"; \
179                         signal, "sunday,"#_pos; \
180                         source, "prog"; \
181                         action, STATE_SET "sunday" 0.0; \
182                         target, "sdh/"#_pos"/text"; \
183                 } \
184                 program { name, "sdh/"#_pos"/satday"; \
185                         signal, "satday,"#_pos; \
186                         source, "prog"; \
187                         action, STATE_SET "satday" 0.0; \
188                         target, "sdh/"#_pos"/text"; \
189                 } \
190         }
191
192 group { name, "main/year/cal";
193
194         images {
195                 image, CALENDAR_YEAR_VIEW_BG COMP;
196                 image, CALENDAR_YEAR_DAY_SELSECTED COMP;
197         }
198
199         parts {
200                 part { name, "base";
201                         type, RECT;
202                         description {
203                                 state, "default" 0.0;
204                                 color, 0 0 0 0;
205                         }
206                 }
207
208                 part { name, "sdh/base";
209                         type, RECT;
210                         description {
211                                 state, "default" 0.0;
212                                 rel1 {
213                                         relative, 0.02 0.02;
214                                         to, "base";
215                                 }
216                                 rel2 {
217                                         relative, 0.98 (0.02 + (1 / 7));
218                                         to, "base";
219                                 }
220                                 color, 0 0 0 0;
221                         }
222                 }
223
224                 part { name, "sdb/base";
225                         type, RECT;
226                         description {
227                                 state, "default" 0.0;
228                                 rel1 {
229                                         relative, 0.02 1.0;
230                                         to_x, "base"; to_y, "sdh/base";
231                                 }
232                                 rel2 {
233                                         relative, 0.98 0.98;
234                                         to, "base";
235                                 }
236                                 color, 0 0 0 0;
237                         }
238                 }
239
240                 SDH(0) SDH(1) SDH(2) SDH(3) SDH(4) SDH(5) SDH(6)
241
242                 SDB( 0) SDB( 1) SDB( 2) SDB( 3) SDB( 4) SDB( 5) SDB( 6)
243                 SDB( 7) SDB( 8) SDB( 9) SDB(10) SDB(11) SDB(12) SDB(13)
244                 SDB(14) SDB(15) SDB(16) SDB(17) SDB(18) SDB(19) SDB(20)
245                 SDB(21) SDB(22) SDB(23) SDB(24) SDB(25) SDB(26) SDB(27)
246                 SDB(28) SDB(29) SDB(30) SDB(31) SDB(32) SDB(33) SDB(34)
247                 SDB(35) SDB(36) SDB(37) SDB(38) SDB(39) SDB(40) SDB(41)
248         }
249
250 }