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.
19 #ifndef __EXTENDED_EDC_H__
20 #define __EXTENDED_EDC_H__
25 /***********************************************************************/
26 /* size difinition layer */
27 #define PART_BG(iName)\
34 state: "default" 0.0;\
39 #define PART_BG_EX(iName, iMinx, iMiny)\
46 state: "default" 0.0;\
52 #define PART_RECT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
59 state: "default" 0.0;\
60 rel1 { relative: iR1x iR1y; to: iR1t; } \
61 rel2 { relative: iR2x iR2y; to: iR2t; } \
66 #define PART_V_PIXEL_RECT(iName, size, iTo, iRy, iAy)\
73 state: "default" 0.0;\
77 rel1 { relative: 0.0 iRy; to: iTo; } \
78 rel2 { relative: 1.0 iRy; to: iTo; } \
83 #define PART_H_PIXEL_RECT(iName, size, iTo, iRx, iAx)\
90 state: "default" 0.0;\
94 rel1 { relative: iRx 0.0; to: iTo; } \
95 rel2 { relative: iRx 1.0; to: iTo; } \
100 #define PART_PIXEL_RECT(iName, iX, iY, iRx, iRy, iTo, iAx, iAy)\
107 state: "default" 0.0;\
111 rel1 { relative: iRx iRy; to: iTo; } \
112 rel2 { relative: iRx iRy; to: iTo; } \
118 /* vertical divided rect, index range from 0~N-1
119 * iIndex must be immediate integer and expression like (1+2) is not allowed
121 #define PART_V_DIVID_RECT(iName, iTo, iIndex, iN)\
128 state: "default" 0.0;\
129 rel1 { relative: 0.0 (iIndex%iN)/iN; to: iTo; } \
130 rel2 { relative: 1.0 (iIndex%iN+1)/iN; to: iTo; } \
135 /* horizontal divided rect, index range from 0~N-1
136 * iIndex must be immediate integer and expression like (1+2) is not allowed
138 #define PART_H_DIVID_RECT(iName, iTo, iIndex, iN)\
145 state: "default" 0.0;\
146 rel1 { relative: (iIndex%iN)/iN 0.0; to: iTo; } \
147 rel2 { relative: (iIndex%iN+1)/iN 1.0; to: iTo; } \
152 #define PART_CLIPPER_RECT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
159 state: "default" 0.0;\
160 rel1 { relative: iR1x iR1y; to: iR1t; } \
161 rel2 { relative: iR2x iR2y; to: iR2t; } \
162 color: 255 255 255 255;\
166 /***********************************************************************/
167 /* mouse event filter layer */
168 #define PART_EVENT_RECT(iName, iTo)\
175 state: "default" 0.0;\
176 rel1 { relative: 0.0 0.0; to: iTo; } \
177 rel2 { relative: 1.0 1.0; to: iTo; } \
182 /***********************************************************************/
184 #define PART_COLOR_RECT(iName, iTo, iCr, iCg, iCb, iCa)\
191 state: "default" 0.0;\
192 rel1 { relative: 0.0 0.0; to: iTo; } \
193 rel2 { relative: 1.0 1.0; to: iTo; } \
194 color: iCr iCg iCb iCa;\
198 #define PART_COLOR_RECT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, iCr, iCg, iCb, iCa)\
205 state: "default" 0.0;\
206 rel1 { relative: iR1x iR1y; to: iR1t; } \
207 rel2 { relative: iR2x iR2y; to: iR2t; } \
208 color: iCr iCg iCb iCa;\
212 #define PART_IMAGE(iName, iTo, iImage)\
219 state: "default" 0.0;\
220 rel1 { relative: 0.0 0.0; to: iTo; } \
221 rel2 { relative: 1.0 1.0; to: iTo; } \
222 image.normal : iImage;\
226 #define PART_IMAGE_REL(iName, iImage, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
227 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
228 PART_IMAGE(iName, "_"iName, iImage)\
230 #define PART_BORDER_IMAGE(iName, iTo, iImage, iBl, iBr, iBt, iBb)\
237 state: "default" 0.0;\
238 rel1 { relative: 0.0 0.0; to: iTo; } \
239 rel2 { relative: 1.0 1.0; to: iTo; } \
240 image.normal : iImage;\
241 image.border : iBl iBr iBt iBb;\
245 #define PART_SWALLOW(iName, iTo)\
252 state: "default" 0.0;\
253 rel1 { relative: 0.0 0.0; to: iTo; } \
254 rel2 { relative: 1.0 1.0; to: iTo; } \
258 #define PART_SWALLOW_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
259 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
260 PART_SWALLOW(iName, "_"iName)\
262 #define PART_UNVISIBLE_SWALLOW(iName, iTo)\
269 state: "default" 0.0;\
271 rel1 { relative: 0.0 0.0; to: iTo; } \
272 rel2 { relative: 1.0 1.0; to: iTo; } \
276 #define PART_UNVISIBLE_SWALLOW_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
277 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
278 PART_UNVISIBLE_SWALLOW(iName, "_"iName)\
280 #define PART_CLIPPED_SWALLOW(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t,\
289 state: "default" 0.0;\
292 rel1 { relative: iR1x iR1y; to: iR1t; } \
293 rel2 { relative: iR2x iR2y; to: iR2t; } \
297 #define PART_TEXT(iName, iTo, iText, iFont, iClass, iSize,\
298 iAx, iAy, iCr, iCg, iCb, iCa)\
305 state: "default" 0.0;\
306 rel1 { relative: 0.0 0.0; to: iTo; } \
307 rel2 { relative: 1.0 1.0; to: iTo; } \
308 color: iCr iCg iCb iCa;\
319 #define PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t,\
320 iText, iFont, iClass, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
321 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
322 PART_TEXT(iName, "_"iName, iText, iFont, iClass, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
324 /***********************************************************************/
326 /* ugh!!!, iPart, iR1t, iR2t and iV of SCRIPT_SET_IMAGE should not be quoted with "" */
327 #define SCRIPT_CUSTOM_PART(iPart)\
328 custom_state(PPART#iPart, "default", 0.0);\
329 set_state(PPART#iPart, "custom", 0.0)
331 /* pay attention, rel paramater can only be float, script will not do evaluation of mathematics expression
332 eg. 10/100 is illegal, 0.1 is correct */
333 #define SCRIPT_SET_REL(iPart, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
334 set_state_val(PPART#iPart, STATE_REL1, iR1x, iR1y);\
335 set_state_val(PPART#iPart, STATE_REL1_TO, PPART#iR1t, PPART#iR1t);\
336 set_state_val(PPART#iPart, STATE_REL2, iR2x, iR2y);\
337 set_state_val(PPART#iPart, STATE_REL2_TO, PPART#iR2t, PPART#iR2t)\
339 #define SCRIPT_SET_VISIBLE(iPart, iV)\
340 set_state_val(PPART#iPart, STATE_VISIBLE, iV)
342 #define SCRIPT_SET_IMAGE(iPart, iV)\
343 set_state_val(PPART#iPart, STATE_IMAGE, PIMAGE#iV)
345 #define SCRIPT_SET_COLOR(iPart, iCr, iCg, iCb, iCa)\
346 set_state_val(PPART#iPart, STATE_COLOR, iCr, iCg, iCb, iCa)
349 /***********************************************************************/
351 /* ugh!!! isignal, isource, iPart should not quoted with "" */
352 #define PROGRAM_SET_VISIBLE(isignal, isource, iPart, iV)\
354 name: #isource#isignal;\
358 SCRIPT_SET_VISIBLE(iPart, iV);\
362 #endif /* __EXTENDED_EDC_H__ */