3 * Copyright 2012 Samsung Electronics Co., Ltd
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
9 * http://www.tizenopensource.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 #ifndef __CALENDAR_EXTENDED_EDC_H__
24 #define __CALENDAR_EXTENDED_EDC_H__
29 /***********************************************************************/
30 /* size difinition layer */
31 #define PART_BG(iName)\
38 state: "default" 0.0;\
43 #define PART_BG_EX(iName, iMinx, iMiny)\
50 state: "default" 0.0;\
56 #define PART_RECT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
63 state: "default" 0.0;\
64 rel1 { relative: iR1x iR1y; to: iR1t; } \
65 rel2 { relative: iR2x iR2y; to: iR2t; } \
70 #define PART_V_PIXEL_RECT(iName, size, iTo, iRy, iAy)\
77 state: "default" 0.0;\
81 rel1 { relative: 0.0 iRy; to: iTo; } \
82 rel2 { relative: 1.0 iRy; to: iTo; } \
87 #define PART_H_PIXEL_RECT(iName, size, iTo, iRx, iAx)\
94 state: "default" 0.0;\
98 rel1 { relative: iRx 0.0; to: iTo; } \
99 rel2 { relative: iRx 1.0; to: iTo; } \
104 #define PART_PIXEL_RECT(iName, iX, iY, iRx, iRy, iTo, iAx, iAy)\
111 state: "default" 0.0;\
115 rel1 { relative: iRx iRy; to: iTo; } \
116 rel2 { relative: iRx iRy; to: iTo; } \
122 /* vertical divided rect, index range from 0~N-1
123 * iIndex must be immediate integer and expression like (1+2) is not allowed
125 #define PART_V_DIVID_RECT(iName, iTo, iIndex, iN)\
132 state: "default" 0.0;\
133 rel1 { relative: 0.0 (iIndex%iN)/iN; to: iTo; } \
134 rel2 { relative: 1.0 (iIndex%iN+1)/iN; to: iTo; } \
139 /* horizontal divided rect, index range from 0~N-1
140 * iIndex must be immediate integer and expression like (1+2) is not allowed
142 #define PART_H_DIVID_RECT(iName, iTo, iIndex, iN)\
149 state: "default" 0.0;\
150 rel1 { relative: (iIndex%iN)/iN 0.0; to: iTo; } \
151 rel2 { relative: (iIndex%iN+1)/iN 1.0; to: iTo; } \
156 #define PART_CLIPPER_RECT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
163 state: "default" 0.0;\
164 rel1 { relative: iR1x iR1y; to: iR1t; } \
165 rel2 { relative: iR2x iR2y; to: iR2t; } \
166 color: 255 255 255 255;\
170 /***********************************************************************/
171 /* mouse event filter layer */
172 #define PART_EVENT_RECT(iName, iTo)\
179 state: "default" 0.0;\
180 rel1 { relative: 0.0 0.0; to: iTo; } \
181 rel2 { relative: 1.0 1.0; to: iTo; } \
186 /***********************************************************************/
188 #define PART_COLOR_RECT(iName, iTo, iCr, iCg, iCb, iCa)\
195 state: "default" 0.0;\
196 rel1 { relative: 0.0 0.0; to: iTo; } \
197 rel2 { relative: 1.0 1.0; to: iTo; } \
198 color: iCr iCg iCb iCa;\
202 #define PART_IMAGE(iName, iTo, iImage)\
209 state: "default" 0.0;\
210 rel1 { relative: 0.0 0.0; to: iTo; } \
211 rel2 { relative: 1.0 1.0; to: iTo; } \
212 image.normal : iImage;\
216 #define PART_IMAGE_REL(iName, iImage, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
217 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
218 PART_IMAGE(iName, "_"iName, iImage)\
220 #define PART_BORDER_IMAGE(iName, iTo, iImage, iBl, iBr, iBt, iBb)\
227 state: "default" 0.0;\
228 rel1 { relative: 0.0 0.0; to: iTo; } \
229 rel2 { relative: 1.0 1.0; to: iTo; } \
230 image.normal : iImage;\
231 image.border : iBl iBr iBt iBb;\
235 #define PART_SWALLOW(iName, iTo)\
242 state: "default" 0.0;\
243 rel1 { relative: 0.0 0.0; to: iTo; } \
244 rel2 { relative: 1.0 1.0; to: iTo; } \
248 #define PART_SWALLOW_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
249 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
250 PART_SWALLOW(iName, "_"iName)\
252 #define PART_UNVISIBLE_SWALLOW(iName, iTo)\
259 state: "default" 0.0;\
261 rel1 { relative: 0.0 0.0; to: iTo; } \
262 rel2 { relative: 1.0 1.0; to: iTo; } \
266 #define PART_UNVISIBLE_SWALLOW_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
267 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
268 PART_UNVISIBLE_SWALLOW(iName, "_"iName)\
270 #define PART_CLIPPED_SWALLOW(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t,\
279 state: "default" 0.0;\
282 rel1 { relative: iR1x iR1y; to: iR1t; } \
283 rel2 { relative: iR2x iR2y; to: iR2t; } \
287 #define PART_TEXT(iName, iTo, iText, iFont, iSize,\
288 iAx, iAy, iCr, iCg, iCb, iCa)\
295 state: "default" 0.0;\
296 rel1 { relative: 0.0 0.0; to: iTo; } \
297 rel2 { relative: 1.0 1.0; to: iTo; } \
298 color: iCr iCg iCb iCa;\
308 #define PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t,\
309 iText, iFont, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
310 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
311 PART_TEXT(iName, "_"iName, iText, iFont, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
313 /***********************************************************************/
315 #define SCRIPT_CUSTOM_PART(iPart)\
316 custom_state(PPART#iPart, "default", 0.0);\
317 set_state(PPART#iPart, "custom", 0.0)
319 #define SCRIPT_SET_REL(iPart, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
320 set_state_val(PPART#iPart, STATE_REL1, iR1x, iR1y);\
321 set_state_val(PPART#iPart, STATE_REL1_TO, PPART#iR1t, PPART#iR1t);\
322 set_state_val(PPART#iPart, STATE_REL2, iR2x, iR2y);\
323 set_state_val(PPART#iPart, STATE_REL2_TO, PPART#iR2t, PPART#iR2t)\
325 #define SCRIPT_SET_VISIBLE(iPart, iV)\
326 set_state_val(PPART#iPart, STATE_VISIBLE, iV)
328 #define SCRIPT_SET_IMAGE(iPart, iV)\
329 set_state_val(PPART#iPart, STATE_IMAGE, PIMAGE#iV)
331 /***********************************************************************/
333 #define PROGRAM_STATE_SET(isignal, isource, itarget, istate)\
335 name: #isource#isignal;\
338 action: STATE_SET #istate 0.0;\
342 #define PROGRAM_SET_VISIBLE(isignal, isource, iPart, iV)\
344 name: #isource#isignal;\
348 SCRIPT_SET_VISIBLE(iPart, iV);\
352 #define PROGRAM_SET_IMAGE(iname, isignal, isource, iPart, image)\
358 set_state_val(PPART#iPart, STATE_IMAGE, PIMAGE#image);\
362 #define PROGRAM_SET_INT(iname, isignal, isource, var, value)\
368 set_int(var, value);\
372 #endif /* __CALENDAR_EXTENDED_EDC_H__ */