2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.tizenopensource.org/license
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __EXTENDED_EDC_H__
18 #define __EXTENDED_EDC_H__
23 /***********************************************************************/
24 /* size difinition layer */
25 #define PART_BG(iName)\
32 state: "default" 0.0;\
37 #define PART_BG_EX(iName, iMinx, iMiny)\
44 state: "default" 0.0;\
50 #define PART_RECT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
57 state: "default" 0.0;\
58 rel1 { relative: iR1x iR1y; to: iR1t; } \
59 rel2 { relative: iR2x iR2y; to: iR2t; } \
64 #define PART_V_PIXEL_RECT(iName, size, iTo, iRy, iAy)\
71 state: "default" 0.0;\
75 rel1 { relative: 0.0 iRy; to: iTo; } \
76 rel2 { relative: 1.0 iRy; to: iTo; } \
81 #define PART_H_PIXEL_RECT(iName, size, iTo, iRx, iAx)\
88 state: "default" 0.0;\
92 rel1 { relative: iRx 0.0; to: iTo; } \
93 rel2 { relative: iRx 1.0; to: iTo; } \
98 #define PART_PIXEL_RECT(iName, iX, iY, iRx, iRy, iTo, iAx, iAy)\
105 state: "default" 0.0;\
109 rel1 { relative: iRx iRy; to: iTo; } \
110 rel2 { relative: iRx iRy; to: iTo; } \
116 /* vertical divided rect, index range from 0~N-1
117 * iIndex must be immediate integer and expression like (1+2) is not allowed
119 #define PART_V_DIVID_RECT(iName, iTo, iIndex, iN)\
126 state: "default" 0.0;\
127 rel1 { relative: 0.0 (iIndex%iN)/iN; to: iTo; } \
128 rel2 { relative: 1.0 (iIndex%iN+1)/iN; to: iTo; } \
133 /* horizontal divided rect, index range from 0~N-1
134 * iIndex must be immediate integer and expression like (1+2) is not allowed
136 #define PART_H_DIVID_RECT(iName, iTo, iIndex, iN)\
143 state: "default" 0.0;\
144 rel1 { relative: (iIndex%iN)/iN 0.0; to: iTo; } \
145 rel2 { relative: (iIndex%iN+1)/iN 1.0; to: iTo; } \
150 #define PART_CLIPPER_RECT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
157 state: "default" 0.0;\
158 rel1 { relative: iR1x iR1y; to: iR1t; } \
159 rel2 { relative: iR2x iR2y; to: iR2t; } \
160 color: 255 255 255 255;\
164 /***********************************************************************/
165 /* mouse event filter layer */
166 #define PART_EVENT_RECT(iName, iTo)\
173 state: "default" 0.0;\
174 rel1 { relative: 0.0 0.0; to: iTo; } \
175 rel2 { relative: 1.0 1.0; to: iTo; } \
180 /***********************************************************************/
182 #define PART_COLOR_RECT(iName, iTo, iCr, iCg, iCb, iCa)\
189 state: "default" 0.0;\
190 rel1 { relative: 0.0 0.0; to: iTo; } \
191 rel2 { relative: 1.0 1.0; to: iTo; } \
192 color: iCr iCg iCb iCa;\
196 #define PART_COLOR_RECT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, iCr, iCg, iCb, iCa)\
203 state: "default" 0.0;\
204 rel1 { relative: iR1x iR1y; to: iR1t; } \
205 rel2 { relative: iR2x iR2y; to: iR2t; } \
206 color: iCr iCg iCb iCa;\
210 #define PART_IMAGE(iName, iTo, iImage)\
217 state: "default" 0.0;\
218 rel1 { relative: 0.0 0.0; to: iTo; } \
219 rel2 { relative: 1.0 1.0; to: iTo; } \
220 image.normal : iImage;\
224 #define PART_IMAGE_REL(iName, iImage, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
225 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
226 PART_IMAGE(iName, "_"iName, iImage)\
228 #define PART_BORDER_IMAGE(iName, iTo, iImage, iBl, iBr, iBt, iBb)\
235 state: "default" 0.0;\
236 rel1 { relative: 0.0 0.0; to: iTo; } \
237 rel2 { relative: 1.0 1.0; to: iTo; } \
238 image.normal : iImage;\
239 image.border : iBl iBr iBt iBb;\
243 #define PART_SWALLOW(iName, iTo)\
250 state: "default" 0.0;\
251 rel1 { relative: 0.0 0.0; to: iTo; } \
252 rel2 { relative: 1.0 1.0; to: iTo; } \
257 #define PART_SWALLOW_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
258 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
259 PART_SWALLOW(iName, "_"iName)\
261 #define PART_UNVISIBLE_SWALLOW(iName, iTo)\
268 state: "default" 0.0;\
270 rel1 { relative: 0.0 0.0; to: iTo; } \
271 rel2 { relative: 1.0 1.0; to: iTo; } \
275 #define PART_UNVISIBLE_SWALLOW_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
276 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
277 PART_UNVISIBLE_SWALLOW(iName, "_"iName)\
279 #define PART_CLIPPED_SWALLOW(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t,\
288 state: "default" 0.0;\
291 rel1 { relative: iR1x iR1y; to: iR1t; } \
292 rel2 { relative: iR2x iR2y; to: iR2t; } \
296 #define PART_TEXT(iName, iTo, iText, iFont, iSize,\
297 iAx, iAy, iCr, iCg, iCb, iCa)\
304 state: "default" 0.0;\
305 rel1 { relative: 0.0 0.0; to: iTo; } \
306 rel2 { relative: 1.0 1.0; to: iTo; } \
307 color: iCr iCg iCb iCa;\
317 #define PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t,\
318 iText, iFont, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
319 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
320 PART_TEXT(iName, "_"iName, iText, iFont, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
322 /***********************************************************************/
324 /* ugh!!!, iPart, iR1t, iR2t and iV of SCRIPT_SET_IMAGE should not be quoted with "" */
325 #define SCRIPT_CUSTOM_PART(iPart)\
326 custom_state(PPART#iPart, "default", 0.0);\
327 set_state(PPART#iPart, "custom", 0.0)
329 /* pay attention, rel paramater can only be float, script will not do evaluation of mathematics expression
330 eg. 10/100 is illegal, 0.1 is correct */
331 #define SCRIPT_SET_REL(iPart, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
332 set_state_val(PPART#iPart, STATE_REL1, iR1x, iR1y);\
333 set_state_val(PPART#iPart, STATE_REL1_TO, PPART#iR1t, PPART#iR1t);\
334 set_state_val(PPART#iPart, STATE_REL2, iR2x, iR2y);\
335 set_state_val(PPART#iPart, STATE_REL2_TO, PPART#iR2t, PPART#iR2t)\
337 #define SCRIPT_SET_VISIBLE(iPart, iV)\
338 set_state_val(PPART#iPart, STATE_VISIBLE, iV)
340 #define SCRIPT_SET_IMAGE(iPart, iV)\
341 set_state_val(PPART#iPart, STATE_IMAGE, PIMAGE#iV)
343 #define SCRIPT_SET_COLOR(iPart, iCr, iCg, iCb, iCa)\
344 set_state_val(PPART#iPart, STATE_COLOR, iCr, iCg, iCb, iCa)
347 /***********************************************************************/
349 /* ugh!!! isignal, isource, iPart should not quoted with "" */
350 #define PROGRAM_SET_VISIBLE(isignal, isource, iPart, iV)\
352 name: #isource#isignal;\
356 SCRIPT_SET_VISIBLE(iPart, iV);\
360 #endif /* __EXTENDED_EDC_H__ */