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 #define PART_BG(pName) \
24 state: "default" 0.0; \
29 #define PART_RECT(pName, pR1x, pR1y, pR1xt, pR1yt, pR2x, pR2y, pR2xt, pR2yt) \
36 state: "default" 0.0; \
37 rel1 { relative: pR1x pR1y; to_x: pR1xt; to_y: pR1yt; } \
38 rel2 { relative: pR2x pR2y; to_x: pR2xt; to_y: pR2yt; } \
43 #define PART_PIXEL_RECT(pName, pX, pY, pAx, pAy, pRx, pRy, pRt) \
50 state: "default" 0.0; \
53 rel1 { relative: pRx pRy; to: pRt; } \
54 rel2 { relative: pRx pRy; to: pRt; } \
59 #define PART_PIXEL_RECT_EX(pName, pX, pY, pAx, pAy, pR1x, pR1y, pR2x, pR2y, pRt) \
66 state: "default" 0.0; \
69 rel1 { relative: pR1x pR1y; to: pRt; } \
70 rel2 { relative: pR2x pR2y; to: pRt; } \
76 #define PART_V_PIXEL_RECT(pName, pY, pAy, pRy, pRt) \
83 state: "default" 0.0; \
87 rel1 { relative: 0.0 pRy; to: pRt; } \
88 rel2 { relative: 1.0 pRy; to: pRt; } \
93 #define PART_H_PIXEL_RECT(pName, pX, pAx, pRx, pRt) \
100 state: "default" 0.0; \
104 rel1 { relative: pRx 0.0; to: pRt; } \
105 rel2 { relative: pRx 1.0; to: pRt; } \
110 #define PART_SWALLOW(pName, pTo) \
117 state: "default" 0.0; \
118 rel1 { relative: 0.0 0.0; to: pTo; } \
119 rel2 { relative: 1.0 1.0; to: pTo; } \
123 #define PART_EVENT_RECT(pName, pTo) \
131 state: "default" 0.0; \
132 rel1 { relative: 0.0 0.0; to: pTo; } \
133 rel2 { relative: 1.0 1.0; to: pTo; } \
138 state: "disabled" 0.0; \
139 inherit: "default" 0.0; \
144 #define PART_COLOR_RECT(pName, pCr, pCg, pCb, pCa, pTo) \
151 state: "default" 0.0; \
152 rel1 { relative: 0.0 0.0; to: pTo; } \
153 rel2 { relative: 1.0 1.0; to: pTo; } \
154 color: pCr pCg pCb pCa; \
158 #define PART_SWALLOW_RECT_BAR(pName, pTo, pRx1, pRy1, pRx2, pRy2)\
165 state: "default" 0.0;\
166 rel1 { relative: pRx1 pRy1; to: pTo;}\
167 rel2 { relative: pRx2 pRy2; to: pTo;}\
171 #define PART_TEXT(pName, pTo, pString, pFont, pClass, pSize, pAx, pAy, pCr, pCg, pCb, pCa) \
178 state: "default" 0.0; \
179 rel1 { relative: 0.0 0.0; to: pTo; } \
180 rel2 { relative: 1.0 1.0; to: pTo; } \
184 text_class: pClass; \
188 color: pCr pCg pCb pCa; \
192 #define PART_IMAGE(pName, pTo, pImage) \
199 state: "default" 0.0; \
200 rel1 { relative: 0.0 0.0; to: pTo; } \
201 rel2 { relative: 1.0 1.0; to: pTo; } \
202 image.normal: pImage; \
206 #define PART_BORDER_IMAGE(pName, pTo, pImage, pL, pR, pT, pB) \
213 state: "default" 0.0; \
214 rel1 { relative: 0.0 0.0; to: pTo; } \
215 rel2 { relative: 1.0 1.0; to: pTo; } \
216 image.normal: pImage; \
217 image.border: pL pR pT pB; \
221 #define PART_TOP_LINE(pName, pTo) \
228 state: "default" 0.0; \
232 color: 187 187 187 255; \
233 rel1 { relative: 0.0 0.0; to: pTo; offset: 0 0; } \
234 rel2 { relative: 1.0 0.0; to: pTo; offset: 0 0; } \
238 #define PART_LEFT_LINE(pName, pTo) \
245 state: "default" 0.0; \
249 color: 187 187 187 255; \
250 rel1 { relative: 0.0 0.0; to: pTo; offset: 0 0; } \
251 rel2 { relative: 0.0 1.0; to: pTo; offset: 0 0; } \
255 #define PART_RIGHT_LINE(pName, pTo) \
262 state: "default" 0.0; \
266 color: 187 187 187 255; \
267 rel1 { relative: 1.0 0.0; to: pTo; offset: 0 0; } \
268 rel2 { relative: 1.0 1.0; to: pTo; offset: 0 0; } \
272 #define PART_BOTTOM_LINE(pName, pTo) \
279 state: "default" 0.0; \
283 color: 187 187 187 255; \
284 rel1 { relative: 0.0 1.0; to: pTo; offset: 0 0; } \
285 rel2 { relative: 1.0 1.0; to: pTo; offset: 0 0; } \
289 #define PART_PADDING_TOP(pName, pSize, pTo) \
290 PART_V_PIXEL_RECT(pName, pSize, 0.0, 0.0, pTo)
292 #define PART_PADDING_BOTTOM(pName, pSize, pTo) \
293 PART_V_PIXEL_RECT(pName, pSize, 1.0, 1.0, pTo)
295 #define PART_PADDING_LEFT(pName, pSize, pTo) \
296 PART_H_PIXEL_RECT(pName, pSize, 0.0, 0.0, pTo)
298 #define PART_PADDING_RIGHT(pName, pSize, pTo) \
299 PART_H_PIXEL_RECT(pName, pSize, 1.0, 1.0, pTo)
301 #define SCRIPT_CUSTOM_PART(pPart) \
302 custom_state(PART:pPart, "default", 0.0); \
303 set_state(PART:pPart, "custom", 0.0);
305 #define SCRIPT_SET_IMAGE(pPart, pVal) \
306 set_state_val(PART:pPart, STATE_IMAGE, IMAGE:pVal);
308 #define SCRIPT_SET_VISIBLE(pPart, pVal) \
309 set_state_val(PART:pPart, STATE_VISIBLE, pVal);
311 #define SCRIPT_SET_STATE_DISABLED(pPart) \
312 set_state(PART:pPart, "disabled", 0.0);
314 #define SCRIPT_SET_STATE_DEFAULT(pPart) \
315 set_state(PART:pPart, "default", 0.0);
317 #define SCRIPT_SET_STATE_SHOW(pPart) \
318 set_state(PART:pPart, "show", 0.0);
320 #define PROGRAM_SET_VISIBLE(pName, pSignal, pSource, pPart) \
326 SCRIPT_SET_STATE_SHOW(pPart) \
330 #define PROGRAM_SET_INVISIBLE(pName, pSignal, pSource, pPart) \
336 SCRIPT_SET_STATE_DEFAULT(pPart) \