Tizen release 1.0
[apps/core/preloaded/calendar.git] / data / edc / layout / extended-edc.h
1 /*
2
3 Copyright (c) 2000-2012 Samsung Electronics Co., Ltd All Rights Reserved
4
5 This file is part of org.tizen.efl-calendar
6 Written by Taeho Kang <taeho84.kang@samsung.com>
7
8 PROPRIETARY/CONFIDENTIAL
9
10 This software is the confidential and proprietary information of
11 SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
12 disclose such Confidential Information and shall use it only in
13 accordance with the terms of the license agreement you entered
14 into with SAMSUNG ELECTRONICS.
15
16 SAMSUNG make no representations or warranties about the suitability
17 of the software, either express or implied, including but not limited
18 to the implied warranties of merchantability, fitness for a particular
19 purpose, or non-infringement. SAMSUNG shall not be liable for any
20 damages suffered by licensee as a result of using, modifying or
21 distributing this software or its derivatives.
22
23 */
24
25
26 #ifndef __CALENDAR_EXTENDED_EDC_H__
27 #define __CALENDAR_EXTENDED_EDC_H__
28
29 #define PPART PART:
30 #define PIMAGE IMAGE:
31
32 /***********************************************************************/
33 /* size difinition layer */
34 #define PART_BG(iName)\
35 part {\
36     name: iName;\
37     type: RECT;\
38     mouse_events: 0;\
39     scale: 1;\
40     description {\
41         state: "default" 0.0;\
42         color: 0 0 0 0;\
43     } \
44 } \
45
46 #define PART_BG_EX(iName, iMinx, iMiny)\
47 part {\
48     name: iName;\
49     type: RECT;\
50     mouse_events: 0;\
51     scale: 1;\
52     description {\
53         state: "default" 0.0;\
54         min: iMinx iMiny;\
55         color: 0 0 0 0;\
56     } \
57 } \
58
59 #define PART_RECT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
60 part {\
61     name: iName;\
62     type: RECT;\
63     mouse_events: 0;\
64     scale: 1;\
65     description {\
66         state: "default" 0.0;\
67         rel1 { relative: iR1x iR1y; to: iR1t; } \
68         rel2 { relative: iR2x iR2y; to: iR2t; } \
69         color: 0 0 0 0;\
70     } \
71 } \
72
73 #define PART_V_PIXEL_RECT(iName, size, iTo, iRy, iAy)\
74 part {\
75     name: iName;\
76     type: RECT;\
77     mouse_events: 0;\
78     scale: 1;\
79     description {\
80         state: "default" 0.0;\
81         min: 0 size;\
82         align: 0.5 iAy;\
83         fixed: 0 1;\
84         rel1 { relative: 0.0 iRy; to: iTo; } \
85         rel2 { relative: 1.0 iRy; to: iTo; } \
86         color: 0 0 0 0;\
87     } \
88 } \
89
90 #define PART_H_PIXEL_RECT(iName, size, iTo, iRx, iAx)\
91 part {\
92     name: iName;\
93     type: RECT;\
94     mouse_events: 0;\
95     scale: 1;\
96     description {\
97         state: "default" 0.0;\
98         min: size 0;\
99         align: iAx 0.5;\
100         fixed: 1 0;\
101         rel1 { relative: iRx 0.0; to: iTo; } \
102         rel2 { relative: iRx 1.0; to: iTo; } \
103         color: 0 0 0 0;\
104     } \
105 } \
106
107 #define PART_PIXEL_RECT(iName, iX, iY, iRx, iRy, iTo, iAx, iAy)\
108 part {\
109     name: iName;\
110     type: RECT;\
111     mouse_events: 0;\
112     scale: 1;\
113     description {\
114         state: "default" 0.0;\
115         min: iX iY;\
116         align: iAx iAy;\
117         fixed: 1 1;\
118         rel1 { relative: iRx iRy; to: iTo; } \
119         rel2 { relative: iRx iRy; to: iTo; } \
120         color: 0 0 0 0;\
121     } \
122 } \
123
124
125 /* vertical divided rect, index range from 0~N-1
126  * iIndex must be immediate integer and expression like (1+2) is not allowed
127  */
128 #define PART_V_DIVID_RECT(iName, iTo, iIndex, iN)\
129 part {\
130     name: iName;\
131     type: RECT;\
132     mouse_events: 0;\
133     scale: 1;\
134     description {\
135         state: "default" 0.0;\
136         rel1 { relative: 0.0 (iIndex%iN)/iN; to: iTo; } \
137         rel2 { relative: 1.0 (iIndex%iN+1)/iN; to: iTo; } \
138         color: 0 0 0 0;\
139     } \
140 } \
141
142 /* horizontal divided rect, index range from 0~N-1
143  * iIndex must be immediate integer and expression like (1+2) is not allowed
144  */
145 #define PART_H_DIVID_RECT(iName, iTo, iIndex, iN)\
146 part {\
147     name: iName;\
148     type: RECT;\
149     mouse_events: 0;\
150     scale: 1;\
151     description {\
152         state: "default" 0.0;\
153         rel1 { relative: (iIndex%iN)/iN 0.0; to: iTo; } \
154         rel2 { relative: (iIndex%iN+1)/iN 1.0; to: iTo; } \
155         color: 0 0 0 0;\
156     } \
157 } \
158
159 #define PART_CLIPPER_RECT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
160 part {\
161     name: iName;\
162     type: RECT;\
163     mouse_events: 0;\
164     scale: 1;\
165     description {\
166         state: "default" 0.0;\
167         rel1 { relative: iR1x iR1y; to: iR1t; } \
168         rel2 { relative: iR2x iR2y; to: iR2t; } \
169         color: 255 255 255 255;\
170     } \
171 } \
172
173 /***********************************************************************/
174 /* mouse event filter layer */
175 #define PART_EVENT_RECT(iName, iTo)\
176 part {\
177     name: iName;\
178     type: RECT;\
179     mouse_events: 1;\
180     scale: 1;\
181     description {\
182         state: "default" 0.0;\
183         rel1 { relative: 0.0 0.0; to: iTo; } \
184         rel2 { relative: 1.0 1.0; to: iTo; } \
185         color: 0 0 0 0;\
186     } \
187 } \
188
189 /***********************************************************************/
190 /* content layer */
191 #define PART_COLOR_RECT(iName, iTo, iCr, iCg, iCb, iCa)\
192 part {\
193     name: iName;\
194     type: RECT;\
195     mouse_events: 0;\
196     scale: 1;\
197     description {\
198         state: "default" 0.0;\
199         rel1 { relative: 0.0 0.0; to: iTo; } \
200         rel2 { relative: 1.0 1.0; to: iTo; } \
201         color: iCr iCg iCb iCa;\
202     } \
203 } \
204
205 #define PART_IMAGE(iName, iTo, iImage)\
206 part {\
207     name: iName;\
208     type: IMAGE;\
209     mouse_events: 0;\
210     scale: 1;\
211     description {\
212         state: "default" 0.0;\
213         rel1 { relative: 0.0 0.0; to: iTo; } \
214         rel2 { relative: 1.0 1.0; to: iTo; } \
215         image.normal : iImage;\
216     } \
217 } \
218
219 #define PART_IMAGE_REL(iName, iImage, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
220 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
221 PART_IMAGE(iName, "_"iName, iImage)\
222
223 #define PART_BORDER_IMAGE(iName, iTo, iImage, iBl, iBr, iBt, iBb)\
224 part {\
225     name: iName;\
226     type: IMAGE;\
227     mouse_events: 0;\
228     scale: 1;\
229     description {\
230         state: "default" 0.0;\
231         rel1 { relative: 0.0 0.0; to: iTo; } \
232         rel2 { relative: 1.0 1.0; to: iTo; } \
233         image.normal : iImage;\
234         image.border : iBl iBr iBt iBb;\
235     } \
236 } \
237
238 #define PART_SWALLOW(iName, iTo)\
239 part {\
240     name: iName;\
241     type: SWALLOW;\
242     mouse_events: 1;\
243     scale: 1;\
244     description {\
245         state: "default" 0.0;\
246         rel1 { relative: 0.0 0.0; to: iTo; } \
247         rel2 { relative: 1.0 1.0; to: iTo; } \
248     } \
249 } \
250
251 #define PART_SWALLOW_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
252 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
253 PART_SWALLOW(iName, "_"iName)\
254
255 #define PART_UNVISIBLE_SWALLOW(iName, iTo)\
256 part {\
257     name: iName;\
258     type: SWALLOW;\
259     mouse_events: 1;\
260     scale: 1;\
261     description {\
262         state: "default" 0.0;\
263         visible: 0;\
264         rel1 { relative: 0.0 0.0; to: iTo; } \
265         rel2 { relative: 1.0 1.0; to: iTo; } \
266     } \
267 } \
268
269 #define PART_UNVISIBLE_SWALLOW_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
270 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
271 PART_UNVISIBLE_SWALLOW(iName, "_"iName)\
272
273 #define PART_CLIPPED_SWALLOW(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t,\
274         iAx, iAy, iCliper)\
275 part {\
276     name: iName;\
277     type: SWALLOW;\
278     mouse_events: 0;\
279     scale: 1;\
280     clip_to: iCliper;\
281     description {\
282         state: "default" 0.0;\
283         align: iAx iAy;\
284         fixed: 1 1;\
285         rel1 { relative: iR1x iR1y; to: iR1t; } \
286         rel2 { relative: iR2x iR2y; to: iR2t; } \
287     } \
288 } \
289
290 #define PART_TEXT(iName, iTo, iText, iFont, iSize,\
291         iAx, iAy, iCr, iCg, iCb, iCa)\
292 part {\
293     name: iName;\
294     type: TEXT;\
295     mouse_events: 0;\
296     scale: 1;\
297     description {\
298         state: "default" 0.0;\
299         rel1 { relative: 0.0 0.0; to: iTo; } \
300         rel2 { relative: 1.0 1.0; to: iTo; } \
301         color: iCr iCg iCb iCa;\
302         text {\
303             text: iText;\
304             font: iFont;\
305             size: iSize;\
306             align: iAx iAy;\
307         } \
308     } \
309 } \
310
311 #define PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t,\
312         iText, iFont, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
313 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
314 PART_TEXT(iName, "_"iName, iText, iFont, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
315
316 /***********************************************************************/
317 /* script */
318 #define SCRIPT_CUSTOM_PART(iPart)\
319 custom_state(PPART#iPart, "default", 0.0);\
320 set_state(PPART#iPart, "custom", 0.0)
321
322 #define SCRIPT_SET_REL(iPart, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
323 set_state_val(PPART#iPart, STATE_REL1, iR1x, iR1y);\
324 set_state_val(PPART#iPart, STATE_REL1_TO, PPART#iR1t, PPART#iR1t);\
325 set_state_val(PPART#iPart, STATE_REL2, iR2x, iR2y);\
326 set_state_val(PPART#iPart, STATE_REL2_TO, PPART#iR2t, PPART#iR2t)\
327
328 #define SCRIPT_SET_VISIBLE(iPart, iV)\
329 set_state_val(PPART#iPart, STATE_VISIBLE, iV)
330
331 #define SCRIPT_SET_IMAGE(iPart, iV)\
332 set_state_val(PPART#iPart, STATE_IMAGE, PIMAGE#iV)
333
334 /***********************************************************************/
335 /* program */
336 #define PROGRAM_STATE_SET(isignal, isource, itarget, istate)\
337 program {\
338     name: #isource#isignal;\
339     source: #isource;\
340     signal: #isignal;\
341     action: STATE_SET #istate 0.0;\
342     target: #itarget;\
343 } \
344
345 #define PROGRAM_SET_VISIBLE(isignal, isource, iPart, iV)\
346 program {\
347     name: #isource#isignal;\
348     source: #isource;\
349     signal: #isignal;\
350     script {\
351         SCRIPT_SET_VISIBLE(iPart, iV);\
352     } \
353 } \
354
355 #define PROGRAM_SET_IMAGE(iname, isignal, isource, iPart, image)\
356 program {\
357     name: iname;\
358     source: isource;\
359     signal: isignal;\
360     script {\
361         set_state_val(PPART#iPart, STATE_IMAGE, PIMAGE#image);\
362     } \
363 } \
364
365 #define PROGRAM_SET_INT(iname, isignal, isource, var, value)\
366 program {\
367     name: iname;\
368     source: isource;\
369     signal: isignal;\
370     script {\
371         set_int(var, value);\
372     } \
373 } \
374
375 #endif /* __CALENDAR_EXTENDED_EDC_H__ */