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://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.
18 #ifndef __CALENDAR_EXTENDED_EDC_H__
19 #define __CALENDAR_EXTENDED_EDC_H__
24 /***********************************************************************/
25 /* size difinition layer */
26 #define PART_BG(iName)\
33 state: "default" 0.0;\
38 #define PART_BG_EX(iName, iMinx, iMiny)\
45 state: "default" 0.0;\
51 #define PART_RECT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
58 state: "default" 0.0;\
59 rel1 { relative: iR1x iR1y; to: iR1t; } \
60 rel2 { relative: iR2x iR2y; to: iR2t; } \
65 #define PART_V_PIXEL_RECT(iName, size, iTo, iRy, iAy)\
72 state: "default" 0.0;\
76 rel1 { relative: 0.0 iRy; to: iTo; } \
77 rel2 { relative: 1.0 iRy; to: iTo; } \
82 #define PART_H_PIXEL_RECT(iName, size, iTo, iRx, iAx)\
89 state: "default" 0.0;\
93 rel1 { relative: iRx 0.0; to: iTo; } \
94 rel2 { relative: iRx 1.0; to: iTo; } \
99 #define PART_PIXEL_RECT(iName, iX, iY, iRx, iRy, iTo, iAx, iAy)\
106 state: "default" 0.0;\
110 rel1 { relative: iRx iRy; to: iTo; } \
111 rel2 { relative: iRx iRy; to: iTo; } \
117 /* vertical divided rect, index range from 0~N-1
118 * iIndex must be immediate integer and expression like (1+2) is not allowed
120 #define PART_V_DIVID_RECT(iName, iTo, iIndex, iN)\
127 state: "default" 0.0;\
128 rel1 { relative: 0.0 (iIndex%iN)/iN; to: iTo; } \
129 rel2 { relative: 1.0 (iIndex%iN+1)/iN; to: iTo; } \
134 /* horizontal divided rect, index range from 0~N-1
135 * iIndex must be immediate integer and expression like (1+2) is not allowed
137 #define PART_H_DIVID_RECT(iName, iTo, iIndex, iN)\
144 state: "default" 0.0;\
145 rel1 { relative: (iIndex%iN)/iN 0.0; to: iTo; } \
146 rel2 { relative: (iIndex%iN+1)/iN 1.0; to: iTo; } \
151 #define PART_CLIPPER_RECT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
158 state: "default" 0.0;\
159 rel1 { relative: iR1x iR1y; to: iR1t; } \
160 rel2 { relative: iR2x iR2y; to: iR2t; } \
161 color: 255 255 255 255;\
165 /***********************************************************************/
166 /* mouse event filter layer */
167 #define PART_EVENT_RECT(iName, iTo)\
174 state: "default" 0.0;\
175 rel1 { relative: 0.0 0.0; to: iTo; } \
176 rel2 { relative: 1.0 1.0; to: iTo; } \
181 /***********************************************************************/
183 #define PART_COLOR_RECT(iName, iTo, iCr, iCg, iCb, iCa)\
190 state: "default" 0.0;\
191 rel1 { relative: 0.0 0.0; to: iTo; } \
192 rel2 { relative: 1.0 1.0; to: iTo; } \
193 color: iCr iCg iCb iCa;\
197 #define PART_IMAGE(iName, iTo, iImage)\
204 state: "default" 0.0;\
205 rel1 { relative: 0.0 0.0; to: iTo; } \
206 rel2 { relative: 1.0 1.0; to: iTo; } \
207 image.normal : iImage;\
211 #define PART_IMAGE_REL(iName, iImage, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
212 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
213 PART_IMAGE(iName, "_"iName, iImage)\
215 #define PART_BORDER_IMAGE(iName, iTo, iImage, iBl, iBr, iBt, iBb)\
222 state: "default" 0.0;\
223 rel1 { relative: 0.0 0.0; to: iTo; } \
224 rel2 { relative: 1.0 1.0; to: iTo; } \
225 image.normal : iImage;\
226 image.border : iBl iBr iBt iBb;\
230 #define PART_SWALLOW(iName, iTo)\
237 state: "default" 0.0;\
238 rel1 { relative: 0.0 0.0; to: iTo; } \
239 rel2 { relative: 1.0 1.0; to: iTo; } \
243 #define PART_SWALLOW_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
244 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
245 PART_SWALLOW(iName, "_"iName)\
247 #define PART_UNVISIBLE_SWALLOW(iName, iTo)\
254 state: "default" 0.0;\
256 rel1 { relative: 0.0 0.0; to: iTo; } \
257 rel2 { relative: 1.0 1.0; to: iTo; } \
261 #define PART_UNVISIBLE_SWALLOW_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
262 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
263 PART_UNVISIBLE_SWALLOW(iName, "_"iName)\
265 #define PART_CLIPPED_SWALLOW(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t,\
274 state: "default" 0.0;\
277 rel1 { relative: iR1x iR1y; to: iR1t; } \
278 rel2 { relative: iR2x iR2y; to: iR2t; } \
282 #define PART_TEXT(iName, iTo, iText, iFont, iSize,\
283 iAx, iAy, iCr, iCg, iCb, iCa)\
290 state: "default" 0.0;\
291 rel1 { relative: 0.0 0.0; to: iTo; } \
292 rel2 { relative: 1.0 1.0; to: iTo; } \
293 color: iCr iCg iCb iCa;\
303 #define PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t,\
304 iText, iFont, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
305 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
306 PART_TEXT(iName, "_"iName, iText, iFont, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
308 /***********************************************************************/
310 #define SCRIPT_CUSTOM_PART(iPart)\
311 custom_state(PPART#iPart, "default", 0.0);\
312 set_state(PPART#iPart, "custom", 0.0)
314 #define SCRIPT_SET_REL(iPart, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
315 set_state_val(PPART#iPart, STATE_REL1, iR1x, iR1y);\
316 set_state_val(PPART#iPart, STATE_REL1_TO, PPART#iR1t, PPART#iR1t);\
317 set_state_val(PPART#iPart, STATE_REL2, iR2x, iR2y);\
318 set_state_val(PPART#iPart, STATE_REL2_TO, PPART#iR2t, PPART#iR2t)\
320 #define SCRIPT_SET_VISIBLE(iPart, iV)\
321 set_state_val(PPART#iPart, STATE_VISIBLE, iV)
323 #define SCRIPT_SET_IMAGE(iPart, iV)\
324 set_state_val(PPART#iPart, STATE_IMAGE, PIMAGE#iV)
326 /***********************************************************************/
328 #define PROGRAM_STATE_SET(isignal, isource, itarget, istate)\
330 name: #isource#isignal;\
333 action: STATE_SET #istate 0.0;\
337 #define PROGRAM_SET_VISIBLE(isignal, isource, iPart, iV)\
339 name: #isource#isignal;\
343 SCRIPT_SET_VISIBLE(iPart, iV);\
347 #define PROGRAM_SET_IMAGE(iname, isignal, isource, iPart, image)\
353 set_state_val(PPART#iPart, STATE_IMAGE, PIMAGE#image);\
357 #define PROGRAM_SET_INT(iname, isignal, isource, var, value)\
363 set_int(var, value);\
367 #endif /* __CALENDAR_EXTENDED_EDC_H__ */