[Genlist] Apply UX 4.8
[platform/core/uifw/efl-theme-tizen.git] / themes / widgets / genlist / genlist_macro.edc
1 /*
2  * efl-theme-tizen
3  * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.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
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  */
17
18 /* genlist multisense sample/tone listing */
19    sounds {
20       sample {
21          name: "button-pressed" RAW;
22          source: "button-pressed.wav";
23       }
24    }
25
26 //****************************************************************************//
27 // *******************************  Default size macro **********************//
28 //**************************************************************************//
29 // if size is different for each theme, split it into each theme inc.
30
31 #define GENLIST_HEIGHT_1LINE              110  // (114 - top/bottom padding)
32 #define GENLIST_HEIGHT_2LINE_MAIN         54
33 #define GENLIST_HEIGHT_2LINE_SUB          42
34 #define GENLIST_HEIGHT_MULTILINE_SUB      38
35 #define GENLIST_PART_LIST_LINE_HEIGHT     1
36 #define GENLIST_HEIGHT_GROUPTITLE         46
37
38 #define GENLIST_PADDING_SIZE_DEFAULT            16
39 #define GENLIST_PADDING_SIZE_LEFT               26
40 #define GENLIST_PADDING_SIZE_RIGHT              26
41 // Dialogue group image has bottom padding (2piexl), Giant font can overlapped bottom line of image.
42 #define GENLIST_PADDING_SIZE_TOP                2
43 #define GENLIST_PADDING_SIZE_BOTTOM             2
44 // -----------------------------------------------------
45 #define GENLIST_PADDING_SIZE_TOP_2LINE          22
46 #define GENLIST_PADDING_SIZE_BOTTOM_2LINE       22
47 #define GENLIST_PADDING_SIZE_TOP_3LINE          17
48 #define GENLIST_PADDING_SIZE_BOTTOM_3LINE       17
49 #define GENLIST_PADDING_SIZE_NDEPTH             26
50
51 #define DIALOGUE_PADDING_SCROLLER         16
52 #define DIALOGUE_PADDING_SIZE_LEFT        16+20
53 #define DIALOGUE_PADDING_SIZE_RIGHT       16+20
54
55 #define GENLIST_ICON_SMALL_SIZE           45
56 #define GENLIST_ICON_STAR_SIZE            45
57 #define GENLIST_ICON_MEDIUM_SIZE          72
58 #define GENLIST_ICON_LARGE_SIZE           99
59
60 #define GENLIST_ICON_MEDIUM_MASK_SIZE     84
61 #define GENLIST_ICON_LARGE_MASK_SIZE      108
62
63 #define GENLIST_BTN_01_HEIGHT             74
64 #define GENLIST_BTN_02_SIZE               72
65 #define GENLIST_ICON_ONOFF_WIDTH          132
66 #define GENLIST_ICON_ONOFF_HEIGHT         70
67 #define GENLIST_ICON_CHECK_RADIO_SIZE     64
68 #define GENLIST_ICON_COLORBAR_SIZE        7
69 #define GENLIST_ICON_PASSWORD_SIZE        82
70
71 #define GENLIST_ICON_ENTRY_SIZE           54
72
73 #define GENLIST_TREESIZE_DEFAULT          26
74
75 //#define GENLIST_DIALOGUE_SEPARATOR_DEFAULT_HEIGHT 40
76
77 //****************************************************************************//
78 // *****************  EDJE description have 24 patterns **********************//
79  //**************************************************************************//
80 // ------------------
81 // |  PART == HERE  |
82 // ------------------
83  #define GENLIST_DESCRIPTION_ENVELOP( PART, PARAM ) \
84       description { state: "default" 0.0;\
85          rel1 { \
86             relative: 0 0; \
87             to: PART; \
88          }\
89          rel2 {\
90             relative: 1 1;\
91             to: PART; \
92          }\
93          PARAM\
94       }
95
96 //      |   top  |
97 // ---------------------
98 // left |  HERE  | right
99 // ---------------------
100 //      | bottom |
101 #define GENLIST_DESCRIPTION( left, right, top, bottom, param ) \
102       description { state: "default" 0.0;\
103          rel1 { \
104             relative: 1 1; \
105             to_x: left; \
106             to_y: top; \
107          }\
108          rel2 {\
109             relative: 0 0;\
110             to_x: right;\
111             to_y: bottom;\
112          }\
113          param\
114       }
115
116 // ---------------------
117 // left |--> HERE
118 // ---------------------
119 #define GENLIST_DESCRIPTION_L( left, param ) \
120       description { state: "default" 0.0;\
121          align: 0 0.5; \
122          fixed: 1 0; \
123          rel1 { \
124             relative: 1 0; \
125             to_x: left; \
126             to_y: "base"; \
127          }\
128          rel2 { \
129             relative: 1 1;\
130             to_x: left; \
131             to_y: "base"; \
132          }\
133          param\
134       }
135
136 // ---------------------
137 //   HERE  <--| right
138 // ---------------------
139 #define GENLIST_DESCRIPTION_R( right, param ) \
140       description { state: "default" 0.0;\
141          align: 1 0.5; \
142          fixed: 1 0; \
143          rel1 { \
144             relative: 0 0; \
145             to_x: right; \
146             to_y: "base"; \
147          }\
148          rel2 {\
149             relative: 0 1;\
150             to_x: right; \
151             to_y: "base"; \
152          }\
153          param\
154       }
155
156 // --------------------------
157 // left |--> HERE  <--| right
158 // --------------------------
159 #define GENLIST_DESCRIPTION_LR( left, right, param ) \
160       description { state: "default" 0.0;\
161          rel1 { \
162             relative: 1 0; \
163             to_x: left; \
164             to_y: "base"; \
165          }\
166          rel2 {\
167             relative: 0 1;\
168             to_x: right;\
169             to_y: "base"; \
170          }\
171          param\
172       }
173
174 //   |  top     |
175 // -----------------
176 //  |  HERE  <--| right
177 // -----------------
178 //  | bottom   |
179 #define GENLIST_DESCRIPTION_RTB( right, top, bottom, param ) \
180       description { state: "default" 0.0;\
181          align: 1 0.5;\
182          rel1 { \
183             relative: 0 1; \
184             to_x: right; \
185             to_y: top; \
186          }\
187          rel2 {\
188             relative: 0 0;\
189             to_x: right;\
190             to_y: bottom;\
191          }\
192          param\
193       }
194
195 // left |  HERE  | right
196 // ---------------------
197 //      | bottom |
198 #define GENLIST_DESCRIPTION_LRB( left, right, bottom, param ) \
199       description { state: "default" 0.0;\
200          align: 0.5 1;\
201          rel1 { \
202             relative: 1 0; \
203             to_x: left; \
204             to_y: bottom; \
205          }\
206          rel2 {\
207             relative: 0 0;\
208             to_x: right;\
209             to_y: bottom;\
210          }\
211          param\
212       }
213
214 //      |   top  |
215 // ---------------------
216 // left |  HERE  | right
217 #define GENLIST_DESCRIPTION_LRT( left, right, top, param ) \
218       description { state: "default" 0.0;\
219          align: 0.5 0;\
220          rel1 { \
221             relative: 1 1; \
222             to_x: left; \
223             to_y: top; \
224          }\
225          rel2 {\
226             relative: 0 1;\
227             to_x: right;\
228             to_y: top;\
229          }\
230          param\
231       }
232
233 //      |       top  |
234 // ---------------------
235 // left | -->  HERE  |
236 #define GENLIST_DESCRIPTION_LT( left, top, param ) \
237       description { state: "default" 0.0;\
238          align: 0 0;\
239          rel1 { \
240             relative: 1 1; \
241             to_x: left; \
242             to_y: top; \
243          }\
244          rel2 {\
245             relative: 1 1;\
246             to_x: left;\
247             to_y: top;\
248          }\
249          param\
250       }
251
252 // left |  --> HERE  |
253 // ---------------------
254 //      |     bottom |
255 #define GENLIST_DESCRIPTION_LB( left, bottom, param ) \
256       description { state: "default" 0.0;\
257          align: 0 1;\
258          rel1 { \
259             relative: 1 0; \
260             to_x: left; \
261             to_y: bottom; \
262          }\
263          rel2 {\
264             relative: 1 0;\
265             to_x: left;\
266             to_y: bottom;\
267          }\
268          param\
269       }
270
271 //      |     top  |
272 // ---------------------
273 // left |--> HERE  |
274 // ---------------------
275 //      |   bottom |
276 #define GENLIST_DESCRIPTION_LTB( left, top, bottom, param ) \
277       description { state: "default" 0.0;\
278          align: 0 0.5;\
279          rel1 { \
280             relative: 1 1; \
281             to_x: left; \
282             to_y: top; \
283          }\
284          rel2 {\
285             relative: 1 0;\
286             to_x: left;\
287             to_y: bottom;\
288          }\
289          param\
290       }
291
292 //      |   top  |
293 // ---------------------
294 //     |  HERE <--| right
295 #define GENLIST_DESCRIPTION_RT( right, top, param ) \
296       description { state: "default" 0.0;\
297          align: 1 0;\
298          rel1 { \
299             relative: 0 1; \
300             to_x: right; \
301             to_y: top; \
302          }\
303          rel2 {\
304             relative: 0 1;\
305             to_x: right;\
306             to_y: top;\
307          }\
308          param\
309       }
310
311 //  | HERE <-- | right
312 // ---------------------
313 //  |  bottom  |
314 #define GENLIST_DESCRIPTION_RB( right, bottom, param ) \
315       description { state: "default" 0.0;\
316          align: 1 1;\
317          rel1 { \
318             relative: 0 0; \
319             to_x: right; \
320             to_y: bottom; \
321          }\
322          rel2 {\
323             relative: 0 0;\
324             to_x: right;\
325             to_y: bottom;\
326          }\
327          param\
328       }
329
330 // |   top  |
331 // ----------
332 // |  HERE  |
333 // ----------
334 // | bottom |
335 #define GENLIST_DESCRIPTION_TB( top, bottom, param ) \
336       description { state: "default" 0.0;\
337          align: 0.5 0.5;\
338          rel1 { \
339             relative: 0 1; \
340             to_y: top; \
341          }\
342          rel2 {\
343             relative: 1 0;\
344             to_y: bottom;\
345          }\
346          param\
347       }
348
349 #define GENLIST_PROLOG \
350       data.item: "stacking" "above"; \
351       data.item: "selectraise" "on"; \
352       data.item: "treesize" 0;
353
354 #define GENLIST_PROLOG_NORMAL \
355       GENLIST_PROLOG \
356       data.item: "treesize" GENLIST_TREESIZE_DEFAULT; \
357       data.item: "flips" "elm.flip.icon elm.flip.content elm.flip.eraser"; \
358       images { \
359          image : "00_list_group_bg.png" COMP; \
360          image : "00_list_group_bg_press.png" COMP; \
361       }
362
363 #define GENLIST_PROLOG_DIALOGUE \
364       GENLIST_PROLOG \
365       data.item: "flips" "elm.flip.icon elm.flip.content elm.flip.eraser"; \
366       images { \
367          image : "00_list_group_bg.png" COMP; \
368          image : "00_list_group_bg_press.png" COMP; \
369          image : "00_list_group_bg_top.png" COMP; \
370          image : "00_list_group_bg_top_press.png" COMP; \
371          image : "00_list_group_bg_center.png" COMP; \
372          image : "00_list_group_bg_center_press.png" COMP; \
373          image : "00_list_group_bg_bottom.png" COMP; \
374          image : "00_list_group_bg_bottom_press.png" COMP; \
375          image : "00_list_group_bg_top_focus.png" COMP; \
376          image : "00_list_group_bg_center_focus.png" COMP; \
377          image : "00_list_group_bg_bottom_focus.png" COMP; \
378       }
379
380 #define GENLIST_NAME(NAME) \
381       name: "elm/genlist/item/"NAME; \
382       alias: "elm/genlist/item_odd/"NAME; \
383       alias: "elm/genlist/item_compress/"NAME; \
384       alias: "elm/genlist/item_compress_odd/"NAME; \
385       alias: "elm/genlist/tree/"NAME; \
386       alias: "elm/genlist/tree_odd/"NAME; \
387       alias: "elm/genlist/tree_compress/"NAME; \
388       alias: "elm/genlist/tree_compress_odd/"NAME; \
389
390 /*****************************************************************************/
391 /******************************* Dialogue group ******************************/
392 /*****************************************************************************/
393 #define GENLIST_DIALOGUE_INHERIT_BODY( _PARTS ) \
394       data.item: "treesize" 0; \
395       parts { \
396          GENLIST_PART_BG_NORMAL_OFF \
397          GENLIST_PART_BOTTOM_LINE_OFF \
398          GENLIST_PART_BG_DIALOGUE \
399          GENLIST_PART_PADDING_LEFT_SIZE( DIALOGUE_PADDING_SIZE_LEFT ) \
400          GENLIST_PART_PADDING_RIGHT_EDIT \
401          _PARTS \
402          GENLIST_PART_FLIP \
403          GENLIST_PART_FOCUS_DIALOGUE \
404       }
405
406 #define GENLIST_INHERIT_THUMB_CIRCLE(SIZE_PREFIX, MASK_SIZE, PARENT) \
407      images { \
408          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_circle_icon_bg_normal.png" COMP; \
409          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_circle_icon_bg_press.png" COMP; \
410          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_circle_icon_bg_dim.png" COMP; \
411          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png" COMP; \
412          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png" COMP; \
413       } \
414       parts { \
415          GENLIST_PART_RECT("elm.thumb.clip", \
416             description { state: "default";  \
417             } \
418             description { state: "flipped";  \
419                color: 0 0 0 0; \
420             } \
421          ) \
422          GENLIST_PART_IMAGE("elm.thumb", \
423             clip_to: "elm.thumb.clip"; \
424             GENLIST_DESCRIPTION_ENVELOP(PARENT, \
425                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_circle_icon_bg_normal.png"; \
426                min: MASK_SIZE MASK_SIZE; \
427                max: MASK_SIZE MASK_SIZE; \
428                fixed:1 1; \
429             ) \
430             description { state: "selected" 0.0; \
431                inherit: "default" 0.0; \
432                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_circle_icon_bg_press.png"; \
433             } \
434             description { state: "disabled" 0.0; \
435                inherit: "default" 0.0; \
436                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_circle_icon_bg_dim.png"; \
437             } \
438             description { state: "reorder" 0.0; \
439                inherit: "default" 0.0; \
440                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png"; \
441             } \
442             description { state: "reorder_selected" 0.0; \
443                inherit: "default" 0.0; \
444                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png"; \
445             } \
446             description { state: "reorder_disabled" 0.0; \
447                inherit: "default" 0.0; \
448                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_circle_icon_bg_dim.png"; \
449             } \
450             description { state: "decorate" 0.0; \
451                inherit: "default" 0.0; \
452             } \
453             description { state: "decorate_reorder" 0.0; \
454                inherit: "reorder" 0.0; \
455             } \
456          ) \
457          GENLIST_PART_FLIP \
458       }
459
460 #define GENLIST_INHERIT_THUMB_SQUARE(SIZE_PREFIX, MASK_SIZE, PARENT) \
461       images { \
462          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_square_icon_bg_normal.png" COMP; \
463          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_square_icon_bg_press.png" COMP; \
464          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_square_icon_bg_dim.png" COMP; \
465          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png" COMP; \
466          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png" COMP; \
467       } \
468       parts { \
469          GENLIST_PART_RECT("elm.thumb.clip", \
470             description { state: "default";  \
471             } \
472             description { state: "flipped";  \
473                color: 0 0 0 0; \
474             } \
475          ) \
476          GENLIST_PART_IMAGE("elm.thumb", \
477             clip_to: "elm.thumb.clip"; \
478             GENLIST_DESCRIPTION_ENVELOP(PARENT, \
479                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_square_icon_bg_normal.png"; \
480                min: MASK_SIZE MASK_SIZE; \
481                max: MASK_SIZE MASK_SIZE; \
482                fixed:1 1; \
483             ) \
484             description { state: "selected" 0.0; \
485                inherit: "default" 0.0; \
486                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_square_icon_bg_press.png"; \
487             } \
488             description { state: "disabled" 0.0; \
489                inherit: "default" 0.0; \
490                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_square_icon_bg_dim.png"; \
491             } \
492             description { state: "reorder" 0.0; \
493                inherit: "default" 0.0; \
494                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png"; \
495             } \
496             description { state: "reorder_selected" 0.0; \
497                inherit: "default" 0.0; \
498                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png"; \
499             } \
500             description { state: "reorder_disabled" 0.0; \
501                inherit: "default" 0.0; \
502                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_square_icon_bg_dim.png"; \
503             } \
504             description { state: "decorate" 0.0; \
505                inherit: "default" 0.0; \
506             } \
507             description { state: "decorate_reorder" 0.0; \
508                inherit: "reorder" 0.0; \
509             } \
510          ) \
511          GENLIST_PART_FLIP \
512       }
513
514
515 #define GENLIST_INHERIT_THUMB_CIRCLE_DIALOGUE(SIZE_PREFIX, MASK_SIZE, PARENT) \
516      images { \
517          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png" COMP; \
518          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png" COMP; \
519          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_dim.png" COMP; \
520       } \
521       parts { \
522          GENLIST_PART_RECT("elm.thumb.clip", \
523             description { state: "default";  \
524             } \
525             description { state: "flipped";  \
526                color: 0 0 0 0; \
527             } \
528          ) \
529          GENLIST_PART_IMAGE("elm.thumb", \
530             clip_to: "elm.thumb.clip"; \
531             GENLIST_DESCRIPTION_ENVELOP(PARENT, \
532                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png"; \
533                min: MASK_SIZE MASK_SIZE; \
534                max: MASK_SIZE MASK_SIZE; \
535                fixed:1 1; \
536             ) \
537             description { state: "selected" 0.0; \
538                inherit: "default" 0.0; \
539                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png"; \
540             } \
541             description { state: "reorder" 0.0; \
542                inherit: "default" 0.0; \
543                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png"; \
544             } \
545             description { state: "reorder_selected" 0.0; \
546                inherit: "default" 0.0; \
547                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png"; \
548             } \
549             description { state: "decorate" 0.0; \
550                inherit: "default" 0.0; \
551             } \
552             description { state: "decorate_reorder" 0.0; \
553                inherit: "reorder" 0.0; \
554             } \
555          ) \
556       }
557
558 #define GENLIST_INHERIT_THUMB_SQUARE_DIALOGUE(SIZE_PREFIX, MASK_SIZE, PARENT) \
559       images { \
560          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png" COMP; \
561          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png" COMP; \
562          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_dim.png" COMP; \
563       } \
564       parts { \
565          GENLIST_PART_RECT("elm.thumb.clip", \
566             description { state: "default";  \
567             } \
568             description { state: "flipped";  \
569                color: 0 0 0 0; \
570             } \
571          ) \
572          GENLIST_PART_IMAGE("elm.thumb", \
573             clip_to: "elm.thumb.clip"; \
574             GENLIST_DESCRIPTION_ENVELOP(PARENT, \
575                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png"; \
576                min: MASK_SIZE MASK_SIZE; \
577                max: MASK_SIZE MASK_SIZE; \
578                fixed:1 1; \
579             ) \
580             description { state: "selected" 0.0; \
581                inherit: "default" 0.0; \
582                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png"; \
583             } \
584             description { state: "reorder" 0.0; \
585                inherit: "default" 0.0; \
586                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png"; \
587             } \
588             description { state: "reorder_selected" 0.0; \
589                inherit: "default" 0.0; \
590                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png"; \
591             } \
592             description { state: "decorate" 0.0; \
593                inherit: "default" 0.0; \
594             } \
595             description { state: "decorate_reorder" 0.0; \
596                inherit: "reorder" 0.0; \
597             } \
598          ) \
599       }
600
601 #define GENLIST_INHERIT_THUMB_CIRCLE_MEDIUM(PARENT) \
602    GENLIST_INHERIT_THUMB_CIRCLE("72x72", GENLIST_ICON_MEDIUM_MASK_SIZE, PARENT)
603
604 #define GENLIST_INHERIT_THUMB_SQUARE_MEDIUM(PARENT) \
605    GENLIST_INHERIT_THUMB_SQUARE("72x72", GENLIST_ICON_MEDIUM_MASK_SIZE, PARENT)
606
607 #define GENLIST_INHERIT_THUMB_CIRCLE_LARGE(PARENT) \
608    GENLIST_INHERIT_THUMB_CIRCLE("99x99", GENLIST_ICON_LARGE_MASK_SIZE, PARENT)
609
610 #define GENLIST_INHERIT_THUMB_SQUARE_LARGE(PARENT) \
611    GENLIST_INHERIT_THUMB_SQUARE("99x99", GENLIST_ICON_LARGE_MASK_SIZE, PARENT)
612
613
614 #define GENLIST_INHERIT_THUMB_CIRCLE_MEDIUM_DIALOGUE(PARENT) \
615    GENLIST_INHERIT_THUMB_CIRCLE_DIALOGUE("72x72", GENLIST_ICON_MEDIUM_MASK_SIZE, PARENT)
616
617 #define GENLIST_INHERIT_THUMB_SQUARE_MEDIUM_DIALOGUE(PARENT) \
618    GENLIST_INHERIT_THUMB_SQUARE_DIALOGUE("72x72", GENLIST_ICON_MEDIUM_MASK_SIZE, PARENT)
619
620 #define GENLIST_INHERIT_THUMB_CIRCLE_LARGE_DIALOGUE(PARENT) \
621    GENLIST_INHERIT_THUMB_CIRCLE_DIALOGUE("99x99", GENLIST_ICON_LARGE_MASK_SIZE, PARENT)
622
623 #define GENLIST_INHERIT_THUMB_SQUARE_LARGE_DIALOGUE(PARENT) \
624    GENLIST_INHERIT_THUMB_SQUARE_DIALOGUE("99x99", GENLIST_ICON_LARGE_MASK_SIZE, PARENT)
625
626 //****************************************************************************//
627 // ****************************** BG Image **********************************//
628 //****************************************************************************//
629 #define GENLIST_PART_BG_NORMAL \
630       GENLIST_PART_RECT("bg_clip", \
631          description { state: "default" 0.0; \
632             color: 255 255 255 255; \
633          } \
634          description { state: "decorate" 0.0; \
635             inherit: "default" 0.0; \
636             color: 0 0 0 0; \
637          } \
638          description { state: "reorder" 0.0; \
639             inherit: "default" 0.0; \
640             color: 0 0 0 0; \
641          } \
642          description { state: "decorate_reorder" 0.0; \
643             inherit: "default" 0.0; \
644             color: 0 0 0 0; \
645          } \
646       ) \
647       GENLIST_PART_RECT("bg",  \
648          clip_to: "bg_clip"; \
649          description { state: "default" 0.0; \
650             color: GENLIST_LIST_BG_COLOR; \
651          } \
652          description { state: "selected" 0.0; \
653             inherit: "default" 0.0; \
654             color: GENLIST_LIST_PRESS_COLOR; \
655          } \
656          description { state: "disabled" 0.0; \
657             inherit: "default" 0.0; \
658             color: GENLIST_LIST_DIM_COLOR; \
659          } \
660       ) \
661       GENLIST_PART_RECT("bg_reorder_clip", \
662          description { state: "default" 0.0; \
663             color: 0 0 0 0; \
664          } \
665          description { state: "reorder" 0.0; \
666             inherit: "default" 0.0; \
667             color: 255 255 255 255; \
668          } \
669          description { state: "decorate_reorder" 0.0; \
670             inherit: "default" 0.0; \
671          } \
672          description { state: "decorate" 0.0; \
673             inherit: "default" 0.0; \
674          } \
675          description { state: "reorder_flip" 0.0; \
676             inherit: "default" 0.0; \
677          } \
678       ) \
679       GENLIST_PART_SPACER("bg_reorder_left", \
680          description { state: "default" 0.0; \
681             min: 16 0; \
682             max: 16 -1; \
683             fixed: 1 0; \
684             align: 0 0.5; \
685             rel2.relative: 0 1; \
686          } \
687       ) \
688       GENLIST_PART_SPACER("bg_reorder_right", \
689          description { state: "default" 0.0; \
690             min: 16 0; \
691             max: 16 -1; \
692             fixed: 1 0; \
693             align: 1.0 0.5; \
694             rel1.relative: 1 0; \
695          } \
696       ) \
697       GENLIST_PART_IMAGE("bg_reorder", \
698          clip_to: "bg_reorder_clip"; \
699          GENLIST_DESCRIPTION_LR("bg_reorder_left", "bg_reorder_right", \
700             image { \
701                normal: "00_list_group_bg.png"; \
702                border: 17 17 8 8; \
703                border_scale: 1; \
704             } \
705          ) \
706          description { state: "selected" 0.0; \
707             inherit: "default"; \
708             image { \
709                normal: "00_list_group_bg_press.png"; \
710                border: 17 17 8 8; \
711                border_scale: 1; \
712             } \
713          } \
714          description { state: "flipped" 0.0; \
715             inherit: "default"; \
716             visible: 0; \
717          } \
718       )
719
720 #define GENLIST_PART_BG_NORMAL_OFF \
721    GENLIST_PART_RECT("bg_clip", \
722       description { state: "default" 0.0; \
723          visible: 0; \
724       } \
725       description { state: "decorate" 0.0; \
726          inherit: "default" 0.0; \
727          visible: 0; \
728       } \
729       description { state: "reorder" 0.0; \
730          inherit: "default" 0.0; \
731          visible: 0; \
732       } \
733       description { state: "decorate_reorder" 0.0; \
734          inherit: "default" 0.0; \
735          visible: 0; \
736       } \
737    ) \
738    GENLIST_PART_RECT("bg", \
739       mouse_events: 0; \
740       description { state: "default" 0.0; \
741          visible: 0; \
742       } \
743       description { state: "selected" 0.0; \
744          visible: 0; \
745       } \
746       description { state: "disabled" 0.0; \
747          visible: 0; \
748       } \
749    ) \
750    GENLIST_PART_RECT("bg_reorder_clip", \
751          description { state: "default" 0.0; \
752             visible: 0; \
753          } \
754          description { state: "reorder" 0.0; \
755             visible: 0; \
756          } \
757          description { state: "decorate_reorder" 0.0; \
758             visible: 0; \
759          } \
760          description { state: "decorate" 0.0; \
761             visible: 0; \
762          } \
763          description { state: "reorder_flip" 0.0; \
764             visible: 0; \
765          } \
766       ) \
767    GENLIST_PART_IMAGE("bg_reorder", \
768       description {state: "default" 0.0;\
769          visible: 0;\
770       }\
771       description { state: "selected" 0.0; {\
772          visible: 0; \
773       } \
774       description { state: "flipped" 0.0; {\
775          visible: 0; \
776       } \
777    )
778
779 #define GENLIST_PART_BG_DIALOGUE \
780    GENLIST_PART_RECT("bg_dialogue_clip", \
781       description { state: "default" 0.0; \
782          color: 255 255 255 255; \
783       } \
784       description { state: "2depth" 0.0; \
785          color: 220 218 211 255; \
786       } \
787    ) \
788    GENLIST_PART_SPACER("bg_dialogue_left", \
789       description { state: "default" 0.0; \
790          min: 16 0; \
791          max: 16 -1; \
792          fixed: 1 0; \
793          align: 0 0.5; \
794          rel2.relative: 0 1; \
795       } \
796    ) \
797    GENLIST_PART_SPACER("bg_dialogue_right", \
798       description { state: "default" 0.0; \
799          min: 16 0; \
800          max: 16 -1; \
801          fixed: 1 0; \
802          align: 1.0 0.5; \
803          rel1.relative: 1 0; \
804       } \
805       description { state: "editmode" 0.0; \
806          inherit: "default" 0.0; \
807          min: (GENLIST_PADDING_SIZE_DEFAULT*2+GENLIST_ICON_MEDIUM_SIZE) 0; \
808          max: (GENLIST_PADDING_SIZE_DEFAULT*2+GENLIST_ICON_MEDIUM_SIZE) 0; \
809       } \
810    ) \
811    GENLIST_PART_IMAGE("bg_dialogue", \
812       insert_after: "base"; \
813       clip_to: "bg_dialogue_clip"; \
814       GENLIST_DESCRIPTION_LR("bg_dialogue_left", "bg_dialogue_right", \
815          image { \
816             normal: "00_list_group_bg.png"; \
817             border: 17 17 8 8; \
818             border_scale: 1; \
819          } \
820       ) \
821       description { state: "selected" 0.0; \
822          inherit: "default" 0.0; \
823          image { \
824             normal: "00_list_group_bg_press.png"; \
825             border: 17 17 8 8; \
826             border_scale: 1; \
827          } \
828       } \
829       description { state: "top" 0.0; \
830          inherit: "default" 0.0; \
831          image { \
832             normal: "00_list_group_bg_top.png"; \
833             border: 17 17 8 8; \
834             border_scale: 1; \
835          } \
836       } \
837       description { state: "top_selected" 0.0; \
838          inherit: "default" 0.0; \
839          image { \
840             normal: "00_list_group_bg_top_press.png"; \
841             border: 17 17 8 8; \
842             border_scale: 1; \
843          } \
844       } \
845       description { state: "center" 0.0; \
846          inherit: "default" 0.0; \
847          image { \
848             normal: "00_list_group_bg_center.png"; \
849             border: 17 17 8 8; \
850             border_scale: 1; \
851          } \
852       } \
853       description { state: "center_selected" 0.0; \
854          inherit: "default" 0.0; \
855          image { \
856             normal: "00_list_group_bg_center_press.png"; \
857             border: 17 17 8 8; \
858             border_scale: 1; \
859          } \
860       } \
861       description { state: "bottom" 0.0; \
862          inherit: "default" 0.0; \
863          image { \
864             normal: "00_list_group_bg_bottom.png"; \
865             border: 17 17 8 8; \
866             border_scale: 1; \
867          } \
868       } \
869       description { state: "bottom_selected" 0.0; \
870          inherit: "default" 0.0; \
871          image { \
872             normal: "00_list_group_bg_bottom_press.png"; \
873             border: 17 17 8 8; \
874             border_scale: 1; \
875          } \
876       } \
877    )
878
879 //****************************************************************************//
880 // ****************************** BASE  ********************************//
881 //****************************************************************************//
882 #define GENLIST_PART_BASE_SIZE(HEIGHT) \
883          part { name: "base"; \
884             type: RECT; \
885             mouse_events: 0; \
886             scale: 1; \
887             description { state: "default" 0.0; \
888                color: 0 0 0 0; \
889                min: 0 HEIGHT; \
890             } \
891             description { state: "disabled" 0.0; \
892                inherit: "default"; \
893             } \
894          } \
895          part { name: "state"; \
896             type: RECT; \
897             mouse_events: 0; \
898             scale: 1; \
899             description { state: "default" 0.0; \
900                color: 0 0 0 0; \
901             } \
902             description { state: "decorate" 0.0; \
903                inherit: "default"; \
904             } \
905             description { state: "reorder" 0.0; \
906                inherit: "default"; \
907             } \
908             description { state: "decorate_reorder" 0.0; \
909                inherit: "default"; \
910             } \
911          }
912
913 #define GENLIST_PART_BASE \
914          GENLIST_PART_BASE_SIZE(0)
915
916
917 #define GENLIST_PART_FOCUS \
918    GENLIST_PART_IMAGE("focus_part", \
919       mouse_events: 0; \
920       description { state: "default" 0.0; \
921          visible: 0; \
922          image { \
923             normal: "00_focus.png"; \
924             border: 7 7 7 7; \
925          } \
926       } \
927       description { state: "focused" 0.0; \
928          inherit: "default" 0.0; \
929          visible: 1; \
930       } \
931    )
932
933 #define GENLIST_PART_FOCUS_DIALOGUE \
934    GENLIST_PART_IMAGE("focus_part", \
935       mouse_events: 0; \
936       GENLIST_DESCRIPTION_LR("bg_dialogue_left", "bg_dialogue_right", \
937          visible: 0; \
938          image { \
939             normal: "00_focus.png"; \
940             border: 7 7 7 7; \
941          } \
942       ) \
943       description { state: "focused" 0.0; \
944          inherit: "default" 0.0; \
945          visible: 1; \
946       } \
947       description { state: "top_focused" 0.0; \
948          inherit: "default" 0.0; \
949          visible: 1; \
950          image { \
951             normal: "00_list_group_bg_top_focus.png"; \
952             border: 7 7 7 7; \
953          } \
954       } \
955       description { state: "center_focused" 0.0; \
956          inherit: "default" 0.0; \
957          visible: 1; \
958          image { \
959             normal: "00_list_group_bg_center_focus.png"; \
960             border: 7 7 7 7; \
961          } \
962       } \
963       description { state: "bottom_focused" 0.0; \
964          inherit: "default" 0.0; \
965          visible: 1; \
966          image { \
967             normal: "00_list_group_bg_bottom_focus.png"; \
968             border: 7 7 7 7; \
969          } \
970       } \
971    )
972
973 //****************************************************************************//
974 // ****************************** LINE ********************************//
975 //****************************************************************************//
976 #define GENLIST_PART_BOTTOM_LINE \
977          GENLIST_PART_RECT("bottom_line_clip", \
978             description { state: "default" 0.0; \
979                color: 255 255 255 255; \
980             } \
981             description { state: "decorate" 0.0; \
982                inherit: "default" 0.0; \
983                color: 0 0 0 0; \
984             } \
985             description { state: "reorder" 0.0; \
986                inherit: "default" 0.0; \
987                color: 0 0 0 0; \
988             } \
989             description { state: "decorate_reorder" 0.0; \
990                inherit: "default" 0.0; \
991                color: 0 0 0 0; \
992             } \
993          ) \
994          GENLIST_PART_RECT("bottom_line", \
995             mouse_events: 0; \
996             clip_to: "bottom_line_clip"; \
997             description { state: "default" 0.0; \
998                min: 0 GENLIST_PART_LIST_LINE_HEIGHT; \
999                max: -1 GENLIST_PART_LIST_LINE_HEIGHT; \
1000                fixed: 0 1; \
1001                align: 0.5 1; \
1002                color: GENLIST_LIST_LINE1_COLOR; \
1003                rel1.to: "bottom_line2"; \
1004                rel2.to: "bottom_line2"; \
1005                rel2.relative: 1 0; \
1006                rel1.offset: -1 -1; \
1007             } \
1008             description { state: "selected" 0.0; \
1009                inherit: "default" 0.0; \
1010                color: GENLIST_LIST_PRESS_COLOR; \
1011             } \
1012             description { state: "disabled" 0.0; \
1013                inherit: "default" 0.0; \
1014                color: GENLIST_LIST_DIM_COLOR; \
1015             } \
1016             description { state: "flipped" 0.0; \
1017                inherit: "default" 0.0; \
1018                visible: 0; \
1019             } \
1020          ) \
1021          GENLIST_PART_RECT("bottom_line2", \
1022             mouse_events: 0; \
1023             clip_to: "bottom_line_clip"; \
1024             description { state: "default" 0.0; \
1025                min: 0 GENLIST_PART_LIST_LINE_HEIGHT; \
1026                max: -1 GENLIST_PART_LIST_LINE_HEIGHT; \
1027                fixed: 0 1; \
1028                align: 0.5 1; \
1029                color: GENLIST_LIST_LINE2_COLOR; \
1030                rel1.to_x: "elm.padding.left"; \
1031                rel1.relative: 1 0; \
1032                rel2.to_x: "elm.padding.right"; \
1033                rel2.relative: 0 1; \
1034                rel1.offset: -1 -1; \
1035             } \
1036             description { state: "selected" 0.0; \
1037                inherit: "default" 0.0; \
1038                color: GENLIST_LIST_PRESS_COLOR; \
1039             } \
1040             description { state: "disabled" 0.0; \
1041                inherit: "default" 0.0; \
1042                color: GENLIST_LIST_DIM_COLOR; \
1043             } \
1044             description { state: "flipped" 0.0; \
1045                inherit: "default" 0.0; \
1046                visible: 0; \
1047             } \
1048          )
1049
1050 #define GENLIST_PART_BOTTOM_LINE_OFF \
1051          GENLIST_PART_RECT("bottom_line", \
1052             mouse_events: 0; \
1053             description { state: "default" 0.0; \
1054                color: 0 0 0 0; \
1055             } \
1056             description { state: "selected" 0.0; \
1057                color: 0 0 0 0; \
1058             } \
1059             description { state: "disabled" 0.0; \
1060                color: 0 0 0 0; \
1061             } \
1062             description { state: "decorate" 0.0; \
1063                color: 0 0 0 0; \
1064             } \
1065          ) \
1066          GENLIST_PART_RECT("bottom_line2", \
1067             mouse_events: 0; \
1068             description { state: "default" 0.0; \
1069                color: 0 0 0 0; \
1070             } \
1071             description { state: "selected" 0.0; \
1072                color: 0 0 0 0; \
1073             } \
1074             description { state: "disabled" 0.0; \
1075                color: 0 0 0 0; \
1076             } \
1077             description { state: "decorate" 0.0; \
1078                color: 0 0 0 0; \
1079             } \
1080          )
1081
1082 #define GENLIST_PART_DIVIDER_PADDING \
1083          GENLIST_PART_SPACER("elm.padding.divider.top", \
1084             description { state: "default" 0.0; \
1085                align: 0.5 0; \
1086                min: 0 30; \
1087                max: -1 30; \
1088                fixed: 0 1; \
1089                rel2.relative: 1 0; \
1090             } \
1091          ) \
1092          GENLIST_PART_SPACER("elm.padding.divider.bottom", \
1093             description { state: "default" 0.0; \
1094                align: 0.5 1; \
1095                min: 0 30; \
1096                max: -1 30; \
1097                fixed: 0 1; \
1098                rel1.relative: 0 1; \
1099             } \
1100          ) \
1101
1102 #define GENLIST_PART_DIVIDER_L(LEFT) \
1103          GENLIST_PART_DIVIDER_PADDING \
1104          GENLIST_PART_RECT("elm.divider1", \
1105             mouse_events: 0; \
1106             GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.divider.top", "elm.padding.divider.bottom", \
1107                align: 0 0.5; \
1108                min: 1 0; \
1109                max: 1 -1; \
1110                fixed: 1 0; \
1111                rel2.offset: 0 0; \
1112                color: GENLIST_LIST_DIVIDER1_COLOR; \
1113             ) \
1114          ) \
1115          GENLIST_PART_RECT("elm.divider2", \
1116             mouse_events: 0; \
1117             GENLIST_DESCRIPTION_LTB("elm.divider1", "elm.padding.divider.top", "elm.padding.divider.bottom", \
1118                align: 0 0.5; \
1119                min: 1 0; \
1120                max: 1 -1; \
1121                fixed: 1 0; \
1122                rel2.offset: 0 0; \
1123                color: GENLIST_LIST_DIVIDER2_COLOR; \
1124             ) \
1125          )
1126
1127 #define GENLIST_PART_DIVIDER_R(RIGHT) \
1128          GENLIST_PART_DIVIDER_PADDING \
1129          GENLIST_PART_RECT("elm.divider1", \
1130             mouse_events: 0; \
1131             GENLIST_DESCRIPTION_RTB("elm.divider2", "elm.padding.divider.top", "elm.padding.divider.bottom", \
1132                min: 1 0; \
1133                max: 1 -1; \
1134                fixed: 1 0; \
1135                rel1.offset: -1 0;\
1136                color: GENLIST_LIST_DIVIDER1_COLOR; \
1137             ) \
1138          ) \
1139          GENLIST_PART_RECT("elm.divider2", \
1140             mouse_events: 0; \
1141             GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.divider.top", "elm.padding.divider.bottom", \
1142                min: 1 0; \
1143                max: 1 -1; \
1144                fixed: 1 0; \
1145                rel1.offset: -1 0;\
1146                color: GENLIST_LIST_DIVIDER2_COLOR; \
1147             ) \
1148          )
1149
1150 #define GENLIST_PART_CENTER_LINE_LT(LEFT, TOP) \
1151          GENLIST_PART_SPACER("elm.padding.divider.left", \
1152             GENLIST_DESCRIPTION_L(LEFT, \
1153                min: 16 0; \
1154                max: 16 -1; \
1155                fixed: 1 0; \
1156             ) \
1157          ) \
1158          GENLIST_PART_SPACER("elm.padding.divider.right", \
1159             GENLIST_DESCRIPTION_ENVELOP("base", \
1160                min: 16 0; \
1161                max: 16 -1; \
1162                fixed: 1 0; \
1163                align: 1 0.5; \
1164                rel1.relative: 1 0; \
1165             ) \
1166          ) \
1167          GENLIST_PART_RECT("center_line", \
1168             mouse_events: 0; \
1169             GENLIST_DESCRIPTION_LRT("elm.padding.divider.left", "elm.padding.divider.right", TOP, \
1170                min: 0 1; \
1171                max: -1 1; \
1172                fixed: 0 1; \
1173                color: GENLIST_LIST_DIVIDER1_COLOR; \
1174             ) \
1175          ) \
1176          GENLIST_PART_RECT("center_line2", \
1177             GENLIST_DESCRIPTION_LRT("elm.padding.divider.left", "elm.padding.divider.right", "center_line", \
1178                min: 0 1; \
1179                max: -1 1; \
1180                fixed: 0 1; \
1181                color: GENLIST_LIST_DIVIDER2_COLOR; \
1182             ) \
1183          )
1184
1185 #define GENLIST_PART_COLORBAR \
1186          GENLIST_PART_SPACER("elm.padding.colorbar.top", \
1187              GENLIST_DESCRIPTION_ENVELOP("base", \
1188                align: 0.5 0; \
1189                fixed: 0 1; \
1190                min: 0 4; \
1191                max: -1 4; \
1192                rel2.relative: 1 0; \
1193              ) \
1194          ) \
1195          GENLIST_PART_SPACER("elm.padding.colorbar.bottom", \
1196              GENLIST_DESCRIPTION_ENVELOP("base", \
1197                align: 0.5 1; \
1198                fixed: 0 1; \
1199                min: 0 4; \
1200                max: -1 4; \
1201                rel1.relative: 0 1; \
1202              ) \
1203          ) \
1204          GENLIST_PART_ICON("elm.swallow.colorbar", \
1205             GENLIST_DESCRIPTION_TB("elm.padding.colorbar.top", "elm.padding.colorbar.bottom", \
1206                min: GENLIST_ICON_COLORBAR_SIZE 0; \
1207                max: GENLIST_ICON_COLORBAR_SIZE -1; \
1208                fixed: 1 0; \
1209                align: 0 0.5; \
1210                rel1.relative: 0 1; \
1211                rel2.relative: 0 0; \
1212             ) \
1213          )
1214
1215 #define GENLIST_PART_COLORBAR_DIALOGUE \
1216          GENLIST_PART_SPACER("elm.padding.colorbar.top", \
1217              GENLIST_DESCRIPTION_ENVELOP("base", \
1218                align: 0.5 0; \
1219                fixed: 0 1; \
1220                min: 0 4; \
1221                max: -1 4; \
1222                rel2.relative: 1 0; \
1223              ) \
1224          ) \
1225          GENLIST_PART_SPACER("elm.padding.colorbar.bottom", \
1226              GENLIST_DESCRIPTION_ENVELOP("base", \
1227                align: 0.5 1; \
1228                fixed: 0 1; \
1229                min: 0 4; \
1230                max: -1 4; \
1231                rel1.relative: 0 1; \
1232              ) \
1233          ) \
1234          GENLIST_PART_SPACER("elm.padding.colorbar.left", \
1235              description{ state: "default" 0.0; \
1236                min: 19 0; \
1237                max: 19 -1; \
1238                fixed: 1 0; \
1239                align: 0 0.5; \
1240                rel1.to: "base"; \
1241                rel2.to: "base"; \
1242                rel2.relative: 0 1; \
1243              } \
1244          ) \
1245          GENLIST_PART_ICON("elm.swallow.colorbar", \
1246             GENLIST_DESCRIPTION_LTB("elm.padding.colorbar.left","elm.padding.colorbar.top", "elm.padding.colorbar.bottom", \
1247                min: GENLIST_ICON_COLORBAR_SIZE 0; \
1248                max: GENLIST_ICON_COLORBAR_SIZE -1; \
1249                fixed: 1 0; \
1250             ) \
1251          )
1252
1253 //****************************************************************************//
1254 //********************************* PADDING **********************************//
1255 //****************************************************************************//
1256 #define GENLIST_PART_EXPANDED_PAD \
1257          part { name: "elm.swallow.pad"; \
1258             type: SWALLOW; \
1259             scale: 1; \
1260             mouse_events: 0; \
1261             description { state: "default" 0.0; \
1262                visible: 0; \
1263                min: 0 0; \
1264                fixed: 1 0; \
1265                align: 0.0 0.5; \
1266                rel1.to: "base"; \
1267                rel2.to: "base"; \
1268                rel2.relative: 0.0 1.0; \
1269             } \
1270          } \
1271
1272 #define GENLIST_PART_PADDING( NAME, SIZE, REL1, REL2 ) \
1273       GENLIST_PART_SPACER(NAME, \
1274          description { state: "default" 0.0; \
1275             min: SIZE 0; \
1276             max: SIZE -1; \
1277             fixed: 1 0; \
1278             align: 0.5 0.5; \
1279             rel1 { \
1280                relative: REL1; \
1281                to: "base"; \
1282             } \
1283             rel2 { \
1284                relative: REL2; \
1285                to: "base"; \
1286             } \
1287          } \
1288       )
1289
1290 #define GENLIST_DESCRIPTION_DECORATE_PADDING \
1291    description { state: "decorate" 0.0; \
1292       inherit: "default" 0.0; \
1293       min: 0 0; \
1294       max: 0 0; \
1295    }
1296
1297 #define GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1298    description { state: "decorate_reorder" 0.0; \
1299       inherit: "default" 0.0; \
1300       min: 0 0; \
1301       max: 0 0; \
1302    }
1303
1304 #define GENLIST_DESCRIPTION_REORDER_PADDING \
1305    description { state: "reorder" 0.0; \
1306       inherit: "default" 0.0; \
1307       min: 32 0; \
1308       max: 32 -1; \
1309    }
1310
1311 #define GENLIST_PART_PADDING_LEFT \
1312          GENLIST_PART_EXPANDED_PAD \
1313          GENLIST_PART_SPACER("elm.padding.left", \
1314             GENLIST_DESCRIPTION_L("elm.swallow.pad",  \
1315                min: GENLIST_PADDING_SIZE_LEFT 0; \
1316                max: GENLIST_PADDING_SIZE_LEFT -1; \
1317                fixed: 1 0; \
1318             ) \
1319             GENLIST_DESCRIPTION_DECORATE_PADDING \
1320             GENLIST_DESCRIPTION_REORDER_PADDING \
1321             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1322          )
1323
1324 #define GENLIST_PART_PADDING_LEFT_SIZE( SIZE ) \
1325          GENLIST_PART_EXPANDED_PAD \
1326          GENLIST_PART_SPACER("elm.padding.left", \
1327             GENLIST_DESCRIPTION_L("elm.swallow.pad",  \
1328                min: SIZE 0; \
1329                max: SIZE -1; \
1330                fixed: 1 0; \
1331             ) \
1332             GENLIST_DESCRIPTION_DECORATE_PADDING \
1333             GENLIST_DESCRIPTION_REORDER_PADDING \
1334             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1335          )
1336
1337 #define GENLIST_PART_EDITBTN \
1338    GENLIST_PART_SPACER("elm.padding.edit.right", \
1339       description { state: "default" 0.0; \
1340          fixed: 1 0; \
1341          align: 1.0 0.5; \
1342          rel1.relative: 1 0; \
1343          min: GENLIST_PADDING_SIZE_RIGHT 0; \
1344          max: GENLIST_PADDING_SIZE_RIGHT -1; \
1345       } \
1346    ) \
1347    GENLIST_PART_ICON("elm.icon.edit", \
1348       GENLIST_DESCRIPTION_R("elm.padding.edit.right", \
1349          visible: 0; \
1350       ) \
1351       description { state: "editmode" 0.0; \
1352          inherit: "default" 0.0; \
1353          visible: 1; \
1354          fixed: 1 1; \
1355          min: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE; \
1356          max: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE; \
1357       } \
1358    )
1359
1360 #define GENLIST_PART_PADDING_RIGHT \
1361          GENLIST_PART_SPACER("elm.padding.right", \
1362             description { state: "default" 0.0; \
1363                min: GENLIST_PADDING_SIZE_RIGHT 0; \
1364                max: GENLIST_PADDING_SIZE_RIGHT -1; \
1365                fixed: 1 0; \
1366                align: 1.0 0.5; \
1367                rel1.to: "base"; \
1368                rel2.to: "base"; \
1369                rel1.relative: 1 0; \
1370             } \
1371             GENLIST_DESCRIPTION_DECORATE_PADDING \
1372             GENLIST_DESCRIPTION_REORDER_PADDING \
1373             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1374          )
1375
1376 #define GENLIST_PART_PADDING_RIGHT_SIZE( SIZE ) \
1377          GENLIST_PART_SPACER("elm.padding.right", \
1378             description { state: "default" 0.0; \
1379                min: SIZE 0; \
1380                max: SIZE -1; \
1381                fixed: 1 0; \
1382                align: 1.0 0.5; \
1383                rel1.to: "base"; \
1384                rel2.to: "base"; \
1385                rel1.relative: 1 0; \
1386             } \
1387             GENLIST_DESCRIPTION_DECORATE_PADDING \
1388             GENLIST_DESCRIPTION_REORDER_PADDING \
1389             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1390          )
1391
1392 // FIXME: Use RECT instead of SPACER if this group is used on layout
1393 // for blocking events
1394 #define GENLIST_PART_PADDING_RIGHT_EDIT \
1395          GENLIST_PART_SPACER("elm.padding.right", \
1396             GENLIST_DESCRIPTION_R("elm.padding.right.edit", \
1397                min: DIALOGUE_PADDING_SIZE_RIGHT 0; \
1398                max: DIALOGUE_PADDING_SIZE_RIGHT -1; \
1399                fixed: 1 0; \
1400             ) \
1401             GENLIST_DESCRIPTION_DECORATE_PADDING \
1402             GENLIST_DESCRIPTION_REORDER_PADDING \
1403             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1404          ) \
1405          GENLIST_PART_SPACER("elm.padding.right.edit", \
1406             description { state: "default" 0.0; \
1407                min:0 0; \
1408                max: 0 -1; \
1409                fixed: 1 0; \
1410                align: 1.0 0.5; \
1411                rel1.relative: 1 0; \
1412             } \
1413             description { state: "editmode" 0.0; \
1414                inherit: "default" 0.0; \
1415                min: (GENLIST_PADDING_SIZE_DEFAULT+GENLIST_ICON_MEDIUM_SIZE) 0; \
1416                max: (GENLIST_PADDING_SIZE_DEFAULT+GENLIST_ICON_MEDIUM_SIZE) -1; \
1417             } \
1418          ) \
1419          GENLIST_PART_EDITBTN
1420
1421 #define GENLIST_PART_PADDING_TOP \
1422          GENLIST_PART_SPACER("elm.padding.top", \
1423             description { \
1424                state: "default" 0.0; \
1425                min: 0 GENLIST_PADDING_SIZE_TOP; \
1426                max: -1 GENLIST_PADDING_SIZE_TOP; \
1427                fixed: 0 1; \
1428                rel1.to: "base"; \
1429                rel2.to: "base"; \
1430                rel2.relative: 1.0 0.0; \
1431                align: 0.5 0.0; \
1432             } \
1433          )
1434
1435 #define GENLIST_PART_PADDING_TOP_2LINE \
1436          GENLIST_PART_SPACER("elm.padding.top", \
1437             description { \
1438                state: "default" 0.0; \
1439                min: 0 GENLIST_PADDING_SIZE_TOP_2LINE; \
1440                max: -1 GENLIST_PADDING_SIZE_TOP_2LINE; \
1441                fixed: 0 1; \
1442                rel1.to: "base"; \
1443                rel2.to: "base"; \
1444                rel2.relative: 1.0 0.0; \
1445                align: 0.5 0.0; \
1446             } \
1447          )
1448
1449 #define GENLIST_PART_PADDING_TOP_SIZE( SIZE ) \
1450          GENLIST_PART_SPACER("elm.padding.top", \
1451             description { \
1452                state: "default" 0.0; \
1453                min: 0 SIZE; \
1454                max: -1 SIZE; \
1455                fixed: 0 1; \
1456                rel1.to: "base"; \
1457                rel2.to: "base"; \
1458                rel2.relative: 1.0 0.0; \
1459                align: 0.5 0.0; \
1460             } \
1461          )
1462
1463 #define GENLIST_PART_PADDING_BOTTOM \
1464          GENLIST_PART_SPACER("elm.padding.bottom", \
1465             description { state: "default" 0.0; \
1466                min: 0 GENLIST_PADDING_SIZE_BOTTOM; \
1467                max: -1 GENLIST_PADDING_SIZE_BOTTOM; \
1468                fixed: 0 1; \
1469                rel1.to: "base"; \
1470                rel2.to: "base"; \
1471                rel1.relative: 0.0 1.0; \
1472                align: 0.5 1.0; \
1473             } \
1474          )
1475
1476 #define GENLIST_PART_PADDING_BOTTOM_2LINE \
1477          GENLIST_PART_SPACER("elm.padding.bottom", \
1478             description { state: "default" 0.0; \
1479                min: 0 GENLIST_PADDING_SIZE_BOTTOM_2LINE; \
1480                max: -1 GENLIST_PADDING_SIZE_BOTTOM_2LINE; \
1481                fixed: 0 1; \
1482                rel1.to: "base"; \
1483                rel2.to: "base"; \
1484                rel1.relative: 0.0 1.0; \
1485                align: 0.5 1.0; \
1486             } \
1487          )
1488
1489 #define GENLIST_PART_PADDING_BOTTOM_SIZE( SIZE ) \
1490          GENLIST_PART_SPACER("elm.padding.bottom", \
1491             description { state: "default" 0.0; \
1492                min: 0 SIZE; \
1493                max: -1 SIZE; \
1494                fixed: 0 1; \
1495                rel1.to: "base"; \
1496                rel2.to: "base"; \
1497                rel1.relative: 0.0 1.0; \
1498                align: 0.5 1.0; \
1499             } \
1500          )
1501
1502 #define GENLIST_PART_PADDING_R( NAME, RIGHT ) \
1503          GENLIST_PART_SPACER(NAME, \
1504             description { state: "default" 0.0; \
1505                fixed: 1 0; \
1506                min: GENLIST_PADDING_SIZE_DEFAULT 0; \
1507                max: GENLIST_PADDING_SIZE_DEFAULT -1; \
1508                align: 1 0.5; \
1509                rel1 { \
1510                   relative: 0 0; \
1511                   to_x: RIGHT; \
1512                } \
1513                rel2 { \
1514                   relative: 0 1; \
1515                   to_x: RIGHT; \
1516                } \
1517             } \
1518          )
1519
1520 #define GENLIST_PART_PADDING_R_SIZE( NAME, RIGHT, SIZE ) \
1521          GENLIST_PART_SPACER(NAME, \
1522             description { state: "default" 0.0; \
1523                fixed: 1 0; \
1524                min: SIZE 0; \
1525                max: SIZE -1; \
1526                align: 1 0.5; \
1527                rel1 { \
1528                   relative: 0 0; \
1529                   to_x: RIGHT; \
1530                } \
1531                rel2 { \
1532                   relative: 0 1; \
1533                   to_x: RIGHT; \
1534                } \
1535             } \
1536          )
1537
1538 #define GENLIST_PART_PADDING_L( NAME, LEFT ) \
1539          GENLIST_PART_SPACER(NAME, \
1540             description { state: "default" 0.0; \
1541                fixed: 1 0; \
1542                min: GENLIST_PADDING_SIZE_DEFAULT 0; \
1543                max: GENLIST_PADDING_SIZE_DEFAULT -1; \
1544                align: 0 0.5; \
1545                rel1 { \
1546                   relative: 1 0; \
1547                   to_x: LEFT; \
1548                } \
1549                rel2 { \
1550                   relative: 1 1; \
1551                   to_x: LEFT; \
1552                } \
1553             } \
1554          )
1555
1556 #define GENLIST_PART_PADDING_L_SIZE( NAME, LEFT, SIZE ) \
1557          GENLIST_PART_SPACER(NAME, \
1558             description { state: "default" 0.0; \
1559                fixed: 1 0; \
1560                min: SIZE 0; \
1561                max: SIZE -1; \
1562                align: 0 0.5; \
1563                rel1 { \
1564                   relative: 1 0; \
1565                   to_x: LEFT; \
1566                } \
1567                rel2 { \
1568                   relative: 1 1; \
1569                   to_x: LEFT; \
1570                } \
1571             } \
1572          )
1573
1574
1575 #define GENLIST_PART_PADDING_T_SIZE( NAME, TOP, SIZE ) \
1576          GENLIST_PART_SPACER(NAME, \
1577             description { state: "default" 0.0; \
1578                min: 0 SIZE; \
1579                max: -1 SIZE; \
1580                fixed: 0 1; \
1581                align: 0.5 0; \
1582                rel1 { \
1583                   relative: 0 1; \
1584                   to: TOP; \
1585                } \
1586                rel2 { \
1587                   relative: 1 1; \
1588                   to: TOP; \
1589                } \
1590             } \
1591          )
1592
1593 #define GENLIST_PART_PADDING_B_SIZE( NAME, BOTTOM, SIZE ) \
1594          GENLIST_PART_SPACER(NAME, \
1595             description { state: "default" 0.0; \
1596                min: 0 SIZE; \
1597                max: -1 SIZE; \
1598                fixed: 0 1; \
1599                align: 0.5 1; \
1600                rel1 { \
1601                   relative: 0.5 0; \
1602                   to: BOTTOM; \
1603                } \
1604                rel2 { \
1605                   relative: 0.5 0; \
1606                   to: BOTTOM; \
1607                } \
1608             } \
1609          )
1610
1611 #define GENLIST_PROGRAM_EXPAND_ROOT( TARGET ) \
1612          program { \
1613             name: "go_expanded"; \
1614             signal: "elm,state,expanded"; \
1615             source: "elm"; \
1616             action: STATE_SET "expand_opened" 0.0; \
1617             TARGET \
1618          } \
1619          program { \
1620             name: "go_contracted"; \
1621             signal: "elm,state,contracted"; \
1622             source: "elm"; \
1623             action: STATE_SET "default" 0.0; \
1624             TARGET \
1625          } \
1626
1627 // 2.2.7 Genlist_Edit mode (Rename)
1628 // FIXME: padding is not needed when swallow content is NULL.
1629 // But how can edje know existence of swallow content?
1630 #define GENLIST_PART_FLIP \
1631          GENLIST_PART_RECT("elm.flip.bg", \
1632             mouse_events: 0; \
1633             description { state: "default" 0.0;\
1634                color: 0 0 0 0;\
1635             } \
1636             description { state: "flipped" 0.0; \
1637                inherit: "default" 0.0; \
1638                rel2.offset: 0 -3; \
1639                color: GENLIST_LIST_BG_COLOR;\
1640             }\
1641          ) \
1642          GENLIST_PART_SPACER("elm.flip.padding.left",  \
1643             description { state: "default" 0.0; \
1644                min: 26 0; \
1645                max: 26 -1; \
1646                fixed: 1 0; \
1647                align: 0 0.5; \
1648                rel2.relative: 0 1; \
1649             } \
1650          ) \
1651          GENLIST_PART_SPACER("elm.flip.padding.right", \
1652             description { state: "default" 0.0; \
1653                min: 26 0; \
1654                max: 26 -1; \
1655                fixed: 1 0; \
1656                align: 1 0.5; \
1657                rel1.relative: 1 0; \
1658             } \
1659          ) \
1660          GENLIST_PART_ICON("elm.flip.content", \
1661             GENLIST_DESCRIPTION("elm.flip.padding.left", "elm.flip.padding.eraser.left",  \
1662                "elm.padding.top", "elm.padding.bottom", \
1663                visible: 0; \
1664                aspect: 1 1; \
1665             ) \
1666             description { state: "flipped" 0.0; \
1667                inherit: "default" 0.0; \
1668                visible: 1; \
1669             } \
1670          ) \
1671          GENLIST_PART_PADDING_R("elm.flip.padding.eraser.left", "elm.flip.eraser") \
1672          GENLIST_PART_ICON("elm.flip.eraser", \
1673             GENLIST_DESCRIPTION_RTB("elm.flip.padding.icon.left",  \
1674                "elm.padding.top", "elm.padding.bottom", \
1675                fixed: 1 0; \
1676                visible: 0; \
1677                min: GENLIST_ICON_ENTRY_SIZE GENLIST_ICON_ENTRY_SIZE; \
1678                max: GENLIST_ICON_ENTRY_SIZE GENLIST_ICON_ENTRY_SIZE; \
1679             ) \
1680             description { state: "show" 0.0; \
1681                inherit: "default" 0.0; \
1682                visible: 1; \
1683             } \
1684          ) \
1685          GENLIST_PART_PADDING_R("elm.flip.padding.icon.left", "elm.flip.icon") \
1686          GENLIST_PART_ICON( "elm.flip.icon", \
1687             GENLIST_DESCRIPTION_RTB("elm.flip.padding.right", \
1688                "elm.padding.top", "elm.padding.bottom", \
1689                visible: 0; \
1690                aspect: 1 1; \
1691                align: 1 0.5; \
1692                max: 154 74; \
1693             ) \
1694             description { state: "flipped" 0.0; \
1695                inherit: "default" 0.0; \
1696                visible: 1; \
1697             } \
1698          )
1699
1700 //****************************************************************************//
1701 // *******************************  Programs ********************************//
1702 //**************************************************************************//
1703 // signal: elm,state,%s,active
1704 //   a "check" item named %s went active
1705 // signal: elm,state,%s,passive
1706 //   a "check" item named %s went passive
1707 // default is passive
1708 #define GENLIST_PROGRAM_DEFAULT( TARGET ) \
1709          program { name: "default"; \
1710             signal: "elm,state,default"; \
1711             source: "elm"; \
1712             action: STATE_SET "default" 0.0; \
1713             TARGET \
1714          } \
1715
1716 #define GENLIST_PROGRAM_DISABLED( TARGET ) \
1717          program { name: "enabled"; \
1718             signal: "elm,state,enabled"; \
1719             source: "elm"; \
1720             action: STATE_SET "default" 0.0; \
1721             target: "base"; \
1722             TARGET \
1723          } \
1724          program { name: "disabled"; \
1725             signal: "elm,state,disabled"; \
1726             source: "elm"; \
1727             action: STATE_SET "disabled" 0.0; \
1728             target: "base"; \
1729             TARGET \
1730          }
1731
1732 #define GENLIST_PROGRAM_FOCUS \
1733       program { name: "focused"; \
1734          signal: "elm,state,focused"; \
1735          source: "elm"; \
1736          action: STATE_SET "focused" 0.0; \
1737          target: "focus_part"; \
1738       } \
1739       program { name: "unfocused"; \
1740          signal: "elm,state,unfocused"; \
1741          source: "elm"; \
1742          action: STATE_SET "default" 0.0; \
1743          target: "focus_part"; \
1744       }
1745
1746 #define GENLIST_PROGRAM_FOCUS_DIALOGUE \
1747       program { name: "focused"; \
1748          signal: "elm,state,focused"; \
1749          source: "elm"; \
1750          script { \
1751             new st[31]; \
1752             new Float:vl; \
1753             get_state(PART:"bg_dialogue", st, 30, vl); \
1754             if (!strcmp(st, "top") || !strcmp(st, "top_selected")) \
1755                set_state(PART:"focus_part", "top_focused", 0.0); \
1756             else if (!strcmp(st, "center") || !strcmp(st, "center_selected")) \
1757                set_state(PART:"focus_part", "center_focused", 0.0); \
1758             else if (!strcmp(st, "bottom") || !strcmp(st, "bottom_selected")) \
1759                set_state(PART:"focus_part", "bottom_focused", 0.0); \
1760             else if (!strcmp(st, "default") || !strcmp(st, "selected")) \
1761                set_state(PART:"focus_part", "focused", 0.0); \
1762          } \
1763       } \
1764       program { name: "unfocused"; \
1765          signal: "elm,state,unfocused"; \
1766          source: "elm"; \
1767          action: STATE_SET "default" 0.0; \
1768          target: "focus_part"; \
1769       }
1770
1771 #define GENLIST_PROGRAM_SOUND( SRC ) \
1772          program { name: "play_sound"SRC; \
1773             signal: "mouse,clicked,1"; \
1774             source: SRC; \
1775             script { \
1776                new st[31]; \
1777                new Float:vl; \
1778                get_state(PART:"base", st, 30, vl); \
1779                if (strcmp(st, "disabled")) \
1780                   run_program(PROGRAM:"play_button_press"SRC); \
1781             } \
1782          } \
1783          program { name: "play_button_press"SRC; \
1784             action: PLAY_SAMPLE "button-pressed" 1.0; \
1785          }
1786
1787 #define GENLIST_PROGRAM_SELECT( TARGET ) \
1788          program { name: "selected"; \
1789             signal: "elm,state,selected"; \
1790             source: "elm"; \
1791             action: STATE_SET "selected" 0.0; \
1792             TARGET \
1793          } \
1794          program { name: "unselected"; \
1795             signal: "elm,state,unselected"; \
1796             source: "elm"; \
1797             action: STATE_SET "default" 0.0; \
1798             TARGET \
1799          }
1800
1801 #define GENLIST_PROGRAM_SELECT_DIALOGUE( TARGET ) \
1802          program { name: "selected"; \
1803             signal: "elm,state,selected"; \
1804             source: "elm"; \
1805             script { \
1806                new st[31]; \
1807                new Float:vl; \
1808                get_state(PART:"bg_dialogue", st, 30, vl); \
1809                if (!strcmp(st, "top")) \
1810                   set_state(PART:"bg_dialogue", "top_selected", 0.0); \
1811                else if (!strcmp(st, "center")) \
1812                   set_state(PART:"bg_dialogue", "center_selected", 0.0); \
1813                else if (!strcmp(st, "bottom")) \
1814                   set_state(PART:"bg_dialogue", "bottom_selected", 0.0); \
1815                else if (!strcmp(st, "default")) \
1816                   set_state(PART:"bg_dialogue", "selected", 0.0); \
1817                run_program(PROGRAM:"target_selected"); \
1818             } \
1819          } \
1820          program { name: "unselected"; \
1821             signal: "elm,state,unselected"; \
1822             source: "elm"; \
1823             script { \
1824                new st[31]; \
1825                new Float:vl; \
1826                get_state(PART:"bg_dialogue", st, 30, vl); \
1827                if (!strcmp(st, "top_selected")) \
1828                   set_state(PART:"bg_dialogue", "top", 0.0); \
1829                else if (!strcmp(st, "center_selected"))  \
1830                   set_state(PART:"bg_dialogue", "center", 0.0); \
1831                else if (!strcmp(st, "bottom_selected"))  \
1832                   set_state(PART:"bg_dialogue", "bottom", 0.0); \
1833                else if (!strcmp(st, "selected")) \
1834                   set_state(PART:"bg_dialogue", "default", 0.0); \
1835                run_program(PROGRAM:"target_unselected"); \
1836             } \
1837          } \
1838          program { name: "target_selected"; \
1839             action: STATE_SET "selected" 0.0; \
1840             TARGET \
1841          }\
1842          program { name: "target_unselected"; \
1843             action: STATE_SET "default" 0.0; \
1844             TARGET \
1845          }\
1846          program { name: "bg_default"; \
1847             signal: "elm,state,default"; \
1848             source: "*"; \
1849             action: STATE_SET "default" 0.0; \
1850             target: "bg_dialogue"; \
1851          } \
1852          program { name: "bg_top"; \
1853             signal: "elm,state,top"; \
1854             source: "*"; \
1855             action: STATE_SET "top" 0.0; \
1856             target: "bg_dialogue"; \
1857          } \
1858          program { name: "bg_center"; \
1859             signal: "elm,state,center"; \
1860             source: "*"; \
1861             action: STATE_SET "center" 0.0; \
1862             target: "bg_dialogue"; \
1863          } \
1864          program { name: "bg_bottom"; \
1865             signal: "elm,state,bottom"; \
1866             source: "*"; \
1867             action: STATE_SET "bottom" 0.0; \
1868             target: "bg_dialogue"; \
1869          }
1870
1871 #define GENLIST_PROGRAM_SELECT_ARROW \
1872          program { name: "selected_arrow"; \
1873             signal: "elm,state,selected"; \
1874             source: "elm"; \
1875             script { \
1876                new st[31]; \
1877                new Float:vl; \
1878                get_state(PART:"arrow", st, 30, vl); \
1879                if (!strcmp(st, "default")) { \
1880                   set_state(PART:"arrow", "default_press", 0.0); \
1881                   set_state(PART:"arrow_clip", "default_press", 0.0); \
1882                } \
1883                else if (!strcmp(st, "expand_opened")) { \
1884                   set_state(PART:"arrow", "expand_opened_press", 0.0); \
1885                   set_state(PART:"arrow_clip", "expand_opened_press", 0.0); \
1886                } \
1887             } \
1888          } \
1889          program { name: "unselected_arrow"; \
1890             signal: "elm,state,unselected"; \
1891             source: "elm"; \
1892             script { \
1893                new st[31]; \
1894                new Float:vl; \
1895                get_state(PART:"arrow", st, 30, vl); \
1896                if (!strcmp(st, "default_press")) { \
1897                   set_state(PART:"arrow", "default", 0.0); \
1898                   set_state(PART:"arrow_clip", "default", 0.0); \
1899                } \
1900                else if (!strcmp(st, "expand_opened_press")) { \
1901                   set_state(PART:"arrow", "expand_opened", 0.0); \
1902                   set_state(PART:"arrow_clip", "expand_opened", 0.0); \
1903                } \
1904             } \
1905          }
1906
1907 #define GENLIST_PROGRAM_DECORATE( TARGET ) \
1908          program { name: "decorate_enabled_effect"; \
1909             signal: "elm,state,decorate,enabled,effect";\
1910             source: "elm";\
1911             action:  STATE_SET "decorate" 0.0;\
1912             TARGET \
1913          }\
1914          program { name: "decorate_disabled_effect";\
1915             signal: "elm,state,decorate,disabled,effect";\
1916             source: "elm";\
1917             action: STATE_SET "default" 0.0; \
1918             TARGET \
1919          }\
1920          program { name: "decorate_enabled";\
1921             signal: "elm,state,decorate,enabled";\
1922             source: "elm";\
1923             action:  STATE_SET "decorate" 0.0;\
1924             TARGET \
1925          }\
1926          program { name: "decorate_disabled";\
1927             signal: "elm,state,decorate,disabled";\
1928             source: "elm";\
1929             action:  STATE_SET "default" 0.0;\
1930             TARGET \
1931          }
1932
1933 #define GENLIST_PROGRAM_REORDER( TARGET ) \
1934          program { name: "reorder_enabled"; \
1935             signal: "elm,state,reorder,mode_set"; \
1936             source: "elm"; \
1937             action: STATE_SET "reorder" 0.0; \
1938             TARGET \
1939          } \
1940          program { name: "reorder_disabled"; \
1941             signal: "elm,state,reorder,mode_unset"; \
1942             source: "elm"; \
1943             action: STATE_SET "default" 0.0; \
1944             TARGET \
1945          }
1946
1947 #define GENLIST_PROGRAM_DECORATE_REORDER( NAME, TARGET ) \
1948          program { name: "reorder_enabled"NAME; \
1949             signal: "elm,state,reorder,mode_set"; \
1950             source: "elm"; \
1951             script { \
1952                new st[31]; \
1953                new Float:vl; \
1954                get_state(PART:"state", st, 30, vl); \
1955                if (!strcmp(st, "decorate") || !strcmp(st, "decorate_reorder")) { \
1956                   run_program(PROGRAM:"decorate_reorder_set"NAME); \
1957                } else { \
1958                   run_program(PROGRAM:"reorder_set"NAME); \
1959                } \
1960             } \
1961          } \
1962          program { name: "reorder_disabled"NAME; \
1963             signal: "elm,state,reorder,mode_unset"; \
1964             source: "elm"; \
1965             script { \
1966                new st[31]; \
1967                new Float:vl; \
1968                get_state(PART:"state", st, 30, vl); \
1969                if (!strcmp(st, "decorate") || !strcmp(st, "decorate_reorder")) { \
1970                   run_program(PROGRAM:"decorate_set"NAME); \
1971                } else { \
1972                   run_program(PROGRAM:"default_set"NAME); \
1973                } \
1974             } \
1975          } \
1976          program { name: "decorate_enabled_effect"NAME; \
1977             signal: "elm,state,decorate,enabled,effect";\
1978             source: "elm";\
1979             script { \
1980                new st[31]; \
1981                new Float:vl; \
1982                get_state(PART:"state", st, 30, vl); \
1983                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
1984                   run_program(PROGRAM:"decorate_reorder_set"NAME); \
1985                } else { \
1986                   run_program(PROGRAM:"decorate_set"NAME); \
1987                } \
1988             } \
1989          }\
1990          program { name: "decorate_disabled_effect"NAME;\
1991             signal: "elm,state,decorate,disabled,effect";\
1992             source: "elm";\
1993             script { \
1994                new st[31]; \
1995                new Float:vl; \
1996                get_state(PART:"state", st, 30, vl); \
1997                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
1998                   run_program(PROGRAM:"reorder_set"NAME); \
1999                } else { \
2000                   run_program(PROGRAM:"default_set"NAME); \
2001                } \
2002             } \
2003          }\
2004          program { name: "decorate_enabled"NAME;\
2005             signal: "elm,state,decorate,enabled";\
2006             source: "elm";\
2007             script { \
2008                new st[31]; \
2009                new Float:vl; \
2010                get_state(PART:"state", st, 30, vl); \
2011                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
2012                   run_program(PROGRAM:"decorate_reorder_set"NAME); \
2013                } else { \
2014                   run_program(PROGRAM:"decorate_set"NAME); \
2015                } \
2016             } \
2017          }\
2018          program { name: "decorate_disabled"NAME;\
2019             signal: "elm,state,decorate,disabled";\
2020             source: "elm";\
2021             script { \
2022                new st[31]; \
2023                new Float:vl; \
2024                get_state(PART:"state", st, 30, vl); \
2025                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
2026                   run_program(PROGRAM:"reorder_set"NAME); \
2027                } else { \
2028                   run_program(PROGRAM:"default_set"NAME); \
2029                } \
2030             } \
2031          } \
2032          program { name: "default_set"NAME; \
2033             action: STATE_SET "default" 0.0;\
2034             target: "state"; \
2035             TARGET \
2036          } \
2037          program { name: "decorate_set"NAME; \
2038             action: STATE_SET "decorate" 0.0;\
2039             target: "state"; \
2040             TARGET \
2041          } \
2042          program { name: "reorder_set"NAME; \
2043             action: STATE_SET "reorder" 0.0;\
2044             target: "state"; \
2045             TARGET \
2046          } \
2047          program { name: "decorate_reorder_set"NAME; \
2048             action: STATE_SET "decorate_reorder" 0.0;\
2049             target: "state"; \
2050             TARGET \
2051          }
2052
2053 #define GENLIST_PROGRAM_FLIP \
2054          program { name: "flip_enabled"; \
2055             signal:  "elm,state,flip,enabled"; \
2056             source:  "elm"; \
2057             transition: DECELERATE 0.5; \
2058             action:  STATE_SET "flipped" 0.0; \
2059             target: "elm.flip.content"; \
2060             target: "elm.flip.icon"; \
2061          } \
2062          program { name: "flip_disabled"; \
2063             signal:  "elm,state,flip,disabled"; \
2064             source:  "elm"; \
2065             transition: DECELERATE 0.5; \
2066             action:  STATE_SET "default" 0.0; \
2067             target: "elm.flip.content"; \
2068             target: "elm.flip.icon"; \
2069          } \
2070          program { name: "flip_enabled_bg"; \
2071             signal:  "elm,state,flip,enabled"; \
2072             source:  "elm"; \
2073             action:  STATE_SET "flipped" 0.0; \
2074             target: "elm.flip.bg"; \
2075          } \
2076          program { name: "flip_disabled_bg"; \
2077             signal:  "elm,state,flip,disabled"; \
2078             source:  "elm"; \
2079             action:  STATE_SET "default" 0.0; \
2080             target: "elm.flip.bg"; \
2081          } \
2082          program { \
2083             signal: "elm,state,eraser,show"; \
2084             action: STATE_SET "show" 0.0; \
2085             target: "elm.flip.eraser"; \
2086          } \
2087          program { \
2088             signal: "elm,state,eraser,hide"; \
2089             action: STATE_SET "default" 0.0; \
2090             target: "elm.flip.eraser"; \
2091          }
2092
2093 #define GENLIST_PROGRAM_FLIP_TARGET( TARGET ) \
2094          program { name: "flip_enabled_target"; \
2095             signal:  "elm,state,flip,enabled"; \
2096             source:  "elm"; \
2097             action:  STATE_SET "flipped" 0.0; \
2098             TARGET \
2099          } \
2100          program { name: "flip_disabled_target"; \
2101             signal:  "elm,state,flip,disabled"; \
2102             source:  "elm"; \
2103             action:  STATE_SET "default" 0.0; \
2104             TARGET \
2105          }
2106
2107 #define GENLIST_PROGRAM_FLIP_EFFECT_TARGET( TARGET ) \
2108          program { name: "flip_enabled_effect"; \
2109             signal:  "elm,state,flip,enabled"; \
2110             source:  "elm"; \
2111             transition: DECELERATE 0.5; \
2112             action:  STATE_SET "flipped" 0.0; \
2113             TARGET \
2114          } \
2115          program { name: "flip_disabled_effect"; \
2116             signal:  "elm,state,flip,disabled"; \
2117             source:  "elm"; \
2118             transition: DECELERATE 0.5; \
2119             action:  STATE_SET "default" 0.0; \
2120             TARGET \
2121          }
2122
2123 #define GENLIST_PROGRAM_EDITMODE \
2124    program { name: "edit_enabled"; \
2125       signal:  "elm,state,edit,enabled"; \
2126       source:  "*"; \
2127       action:  STATE_SET "editmode" 0.0; \
2128       target: "elm.padding.right.edit"; \
2129       target: "elm.icon.edit"; \
2130       target: "bg_dialogue_right"; \
2131    } \
2132    program { name: "edit_disabled"; \
2133       signal:  "elm,state,edit,disabled"; \
2134       source:  "*"; \
2135       action:  STATE_SET "default" 0.0; \
2136       target: "elm.padding.right.edit"; \
2137       target: "elm.icon.edit"; \
2138       target: "bg_dialogue_right"; \
2139    }
2140
2141 /***************************************************************************/
2142 /***************************************************************************/
2143
2144 #define GENLIST_PROGRAMS_NORMAL( TARGET ) \
2145    programs { \
2146       GENLIST_PROGRAM_DEFAULT( TARGET \
2147          target: "bg"; \
2148          target: "bg_clip"; \
2149          target: "bottom_line"; \
2150          target: "bottom_line2"; \
2151          target: "bottom_line_clip"; \
2152          target: "bg_reorder"; \
2153          target: "elm.padding.left"; \
2154          target: "elm.padding.right"; \
2155       ) \
2156       GENLIST_PROGRAM_DISABLED( TARGET \
2157          target: "bg"; \
2158          target: "bottom_line"; \
2159          target: "bottom_line2"; \
2160          target: "bg_reorder"; \
2161       ) \
2162       GENLIST_PROGRAM_FOCUS \
2163       GENLIST_PROGRAM_SELECT( TARGET \
2164          target: "bg"; \
2165          target: "bottom_line"; \
2166          target: "bottom_line2"; \
2167          target: "bg_reorder"; \
2168       ) \
2169       GENLIST_PROGRAM_SOUND( "bg" ) \
2170       GENLIST_PROGRAM_SOUND( "bg_reorder" ) \
2171       GENLIST_PROGRAM_DECORATE_REORDER("normal", TARGET \
2172          target: "bg_clip"; \
2173          target: "bg_reorder_clip"; \
2174          target: "bottom_line_clip"; \
2175          target: "elm.padding.left"; \
2176          target: "elm.padding.right"; \
2177       ) \
2178       GENLIST_PROGRAM_FLIP \
2179    }
2180
2181 // FIXME: inheritance !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
2182 // if GENLIST_PROGRAM_EXPAND is here, expanda effect is something wrong.
2183 // because after can be duplicated when program inheriting.
2184 #define GENLIST_PROGRAMS_DIALOGUE( TARGET ) \
2185    programs { \
2186       GENLIST_PROGRAM_DEFAULT( TARGET \
2187          target: "bg_dialogue"; \
2188          target: "bg_dialogue_clip"; \
2189          target: "elm.padding.left"; \
2190          target: "elm.padding.right"; \
2191       ) \
2192       GENLIST_PROGRAM_DISABLED( TARGET ) \
2193       GENLIST_PROGRAM_FOCUS_DIALOGUE \
2194       GENLIST_PROGRAM_SELECT_DIALOGUE( TARGET ) \
2195       program { name: "bg_color_change"; \
2196          signal: "bg_color_change"; \
2197          source: "elm"; \
2198          action: STATE_SET "2depth" 0.0; \
2199          target: "bg_dialogue_clip"; \
2200       } \
2201       GENLIST_PROGRAM_SOUND("bg_dialogue") \
2202       GENLIST_PROGRAM_DECORATE_REORDER( "normal", TARGET \
2203          target: "elm.padding.left"; \
2204          target: "elm.padding.right"; \
2205       ) \
2206       GENLIST_PROGRAM_FLIP \
2207       GENLIST_PROGRAM_EDITMODE \
2208    }
2209
2210 #define GENLIST_PROGRAMS_READ_TEXT( TARGET ) \
2211    programs { \
2212       GENLIST_PROGRAM_DEFAULT( TARGET \
2213          target: "bg"; \
2214          target: "bg_clip"; \
2215          target: "bottom_line"; \
2216          target: "bottom_line2"; \
2217          target: "bottom_line_clip"; \
2218          target: "bg_reorder"; \
2219          target: "elm.padding.left"; \
2220          target: "elm.padding.right"; \
2221       ) \
2222       GENLIST_PROGRAM_DISABLED( TARGET \
2223          target: "bg"; \
2224          target: "bottom_line"; \
2225          target: "bottom_line2"; \
2226          target: "bg_reorder"; \
2227       ) \
2228       GENLIST_PROGRAM_FOCUS \
2229       GENLIST_PROGRAM_SELECT( TARGET \
2230          target: "bg"; \
2231          target: "bottom_line"; \
2232          target: "bottom_line2"; \
2233          target: "bg_reorder"; \
2234       ) \
2235       GENLIST_PROGRAM_SOUND("bg") \
2236       GENLIST_PROGRAM_DECORATE_REORDER( "normal", \
2237          target: "bg_clip"; \
2238          target: "bg_reorder_clip"; \
2239          target: "bottom_line_clip"; \
2240          target: "elm.padding.left"; \
2241          target: "elm.padding.right"; \
2242       ) \
2243       program { name: "unselected_target"; \
2244          action: STATE_SET "default" 0.0; \
2245          TARGET \
2246       } \
2247       program { name: "unselected_read"; \
2248          signal: "elm,state,unselected"; \
2249          source: "elm"; \
2250          script { \
2251             if (get_int(readed) == 1) \
2252                run_program(PROGRAM:"go_read_target"); \
2253             else \
2254                run_program(PROGRAM:"unselected_target"); \
2255          } \
2256       } \
2257       program { name: "go_read"; \
2258          signal: "elm,state,read"; \
2259          source: "*"; \
2260          script { \
2261            set_int(readed, 1); \
2262            run_program(PROGRAM:"go_read_target"); \
2263          } \
2264       } \
2265       program { name: "go_unread"; \
2266          signal: "elm,state,unread"; \
2267          source: "*"; \
2268          script { \
2269            set_int(readed, 0); \
2270            run_program(PROGRAM:"go_unread_target"); \
2271          } \
2272       } \
2273       program { name: "go_read_target"; \
2274          action: STATE_SET "read" 0.0; \
2275          TARGET \
2276       } \
2277       program { name: "go_unread_target"; \
2278          action: STATE_SET "unread" 0.0; \
2279          TARGET \
2280       } \
2281    }
2282
2283 #define GENLIST_PROGRAMS_DECORATE_EFFECT( TARGET ) \
2284    program { name: "decorate_enabled_effect_ef"; \
2285       signal: "elm,state,decorate,enabled,effect";\
2286       source: "elm";\
2287       transition: DECELERATE 0.5;\
2288       action:  STATE_SET "decorate" 0.0;\
2289       TARGET \
2290    }\
2291    program { name: "decorate_disabled_effect_ef";\
2292       signal: "elm,state,decorate,disabled,effect";\
2293       source: "elm";\
2294       transition: ACCELERATE 0.5;\
2295       action:  STATE_SET "default" 0.0;\
2296       TARGET \
2297    } \
2298    program { name: "decorate_enabled_ef";\
2299       signal: "elm,state,decorate,enabled";\
2300       source: "elm";\
2301       action:  STATE_SET "decorate" 0.0;\
2302       TARGET \
2303    }\
2304    program { name: "decorate_disabled_ef";\
2305       signal: "elm,state,decorate,disabled";\
2306       source: "elm";\
2307       action:  STATE_SET "default" 0.0;\
2308       TARGET \
2309    }
2310
2311 #define GENLIST_PROGRAMS_ENTRY \
2312    program { \
2313       signal: "elm,state,eraser,show"; \
2314       action: STATE_SET "show" 0.0; \
2315       target: "elm.icon.eraser"; \
2316    } \
2317    program { \
2318       signal: "elm,state,eraser,hide"; \
2319       action: STATE_SET "default" 0.0; \
2320       target: "elm.icon.eraser"; \
2321    } \
2322     program { \
2323       signal: "elm,state,rename,show"; \
2324       action: STATE_SET "default" 0.0; \
2325       target: "elm.image.rename"; \
2326    } \
2327    program { \
2328       signal: "elm,state,rename,hide"; \
2329       action: STATE_SET "hide" 0.0; \
2330       target: "elm.image.rename"; \
2331    }
2332
2333 #define GENLIST_PROGRAMS_THUMB \
2334    GENLIST_PROGRAM_DECORATE_REORDER( "thumb", target: "elm.thumb"; ) \
2335    GENLIST_PROGRAM_FLIP_TARGET( target: "elm.thumb.clip"; ) \
2336    program { name: "enabled_thumb"; \
2337       signal: "elm,state,enabled"; \
2338       source: "elm"; \
2339       action: STATE_SET "default" 0.0; \
2340       target: "base"; \
2341       target: "elm.thumb"; \
2342    } \
2343    program { name: "disabled_thumb"; \
2344       signal: "elm,state,disabled"; \
2345       source: "elm"; \
2346       action: STATE_SET "disabled" 0.0; \
2347       target: "base"; \
2348       target: "elm.thumb"; \
2349    } \
2350    program { name: "selected_thumb"; \
2351       signal: "elm,state,selected"; \
2352       source: "elm"; \
2353       script { \
2354          new st[31]; \
2355          new Float:vl; \
2356          get_state(PART:"elm.thumb", st, 30, vl); \
2357          if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) \
2358             set_state(PART:"elm.thumb", "reorder_selected", 0.0); \
2359          else \
2360             set_state(PART:"elm.thumb", "selected", 0.0); \
2361       } \
2362    } \
2363    program { name: "unselected_thumb"; \
2364       signal: "elm,state,unselected"; \
2365       source: "elm"; \
2366       script { \
2367          new st[31]; \
2368          new Float:vl; \
2369          get_state(PART:"elm.thumb", st, 30, vl); \
2370          if (!strcmp(st, "reorder_selected")) \
2371             set_state(PART:"elm.thumb", "reorder", 0.0); \
2372          else \
2373             set_state(PART:"elm.thumb", "default", 0.0); \
2374       } \
2375    }
2376
2377 //****************************************************************************//
2378 // *******************************  Icon Part ******************************//
2379 //***************************************************************************//
2380 #define GENLIST_PART_ICON(NAME, DESCRIPION) \
2381    part { name: NAME; \
2382       scale: 1; \
2383       type: SWALLOW; \
2384       DESCRIPION \
2385    }
2386
2387 #define GENLIST_PARAM_ICON_BIG \
2388          min: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE; \
2389          max: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE;
2390
2391 #define GENLIST_PARAM_ICON_SMALL \
2392          min: GENLIST_ICON_SMALL_SIZE GENLIST_ICON_SMALL_SIZE; \
2393          max: GENLIST_ICON_SMALL_SIZE GENLIST_ICON_SMALL_SIZE;
2394
2395 #define GENLIST_PARAM_ICON_BTN_01 \
2396          min: 0 GENLIST_BTN_01_HEIGHT; \
2397          max: -1 GENLIST_BTN_01_HEIGHT;
2398
2399 #define GENLIST_PARAM_ICON_BTN_02 \
2400          min: GENLIST_BTN_02_SIZE GENLIST_BTN_02_SIZE; \
2401          max: GENLIST_BTN_02_SIZE GENLIST_BTN_02_SIZE;
2402
2403 #define GENLIST_PARAM_ICON_ONOFF_WIDTH \
2404          min: GENLIST_ICON_ONOFF_WIDTH GENLIST_ICON_ONOFF_HEIGHT; \
2405          max: GENLIST_ICON_ONOFF_WIDTH GENLIST_ICON_ONOFF_HEIGHT;
2406
2407 #define GENLIST_PARAM_ICON_THUMBNAIL1\
2408          min: GENLIST_ICON_LARGE_SIZE GENLIST_ICON_LARGE_SIZE; \
2409          max: GENLIST_ICON_LARGE_SIZE GENLIST_ICON_LARGE_SIZE;
2410
2411 #define GENLIST_PARAM_ICON_CHECK_RADIO \
2412          min: GENLIST_ICON_CHECK_RADIO_SIZE GENLIST_ICON_CHECK_RADIO_SIZE; \
2413          max: GENLIST_ICON_CHECK_RADIO_SIZE GENLIST_ICON_CHECK_RADIO_SIZE;
2414
2415 #define GENLIST_PARAM_ICON_STAR \
2416          min: GENLIST_ICON_STAR_SIZE GENLIST_ICON_STAR_SIZE; \
2417          max: GENLIST_ICON_STAR_SIZE GENLIST_ICON_STAR_SIZE; \
2418
2419 #define GENLIST_PART_ICON_BIG_R(NAME, RIGHT) \
2420    GENLIST_PART_ICON(NAME, \
2421       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2422          fixed: 1 1; \
2423          GENLIST_PARAM_ICON_BIG \
2424       ) \
2425    )
2426
2427 #define GENLIST_PART_ICON_BIG_L(NAME, LEFT) \
2428    GENLIST_PART_ICON(NAME, \
2429       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2430          GENLIST_PARAM_ICON_BIG \
2431          fixed: 1 1; \
2432       ) \
2433    )
2434
2435 #define GENLIST_PART_ICON_SMALL_L(NAME, LEFT) \
2436    GENLIST_PART_ICON(NAME, \
2437       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2438          GENLIST_PARAM_ICON_SMALL \
2439          fixed: 1 1; \
2440       ) \
2441    )
2442
2443 #define GENLIST_PART_ICON_SMALL_LB(NAME, LEFT, BOTTOM) \
2444    GENLIST_PART_ICON(NAME, \
2445       GENLIST_DESCRIPTION_LB(LEFT, BOTTOM, \
2446         GENLIST_PARAM_ICON_SMALL \
2447         fixed: 1 1; \
2448       ) \
2449    )
2450
2451 #define GENLIST_PART_ICON_SMALL_LTB(NAME, LEFT, TOP, BOTTOM) \
2452    GENLIST_PART_ICON(NAME, \
2453       GENLIST_DESCRIPTION_LTB(LEFT, TOP, BOTTOM, \
2454          GENLIST_PARAM_ICON_SMALL \
2455          fixed: 1 1; \
2456       ) \
2457    )
2458
2459 #define GENLIST_PART_ICON_SMALL_RTB(NAME, RIGHT, TOP, BOTTOM) \
2460    GENLIST_PART_ICON(NAME, \
2461       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
2462          GENLIST_PARAM_ICON_SMALL \
2463          fixed: 1 1; \
2464       ) \
2465    )
2466
2467 #define GENLIST_PART_ICON_BTN_01_RTB(NAME, RIGHT, TOP, BOTTOM) \
2468    GENLIST_PART_ICON(NAME, \
2469       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM,\
2470          GENLIST_PARAM_ICON_BTN_01 \
2471          fixed: 1 1; \
2472       ) \
2473    )
2474
2475 #define GENLIST_PART_ICON_BTN_02_RTB(NAME, RIGHT, TOP, BOTTOM) \
2476    GENLIST_PART_ICON(NAME, \
2477       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM,\
2478          GENLIST_PARAM_ICON_BTN_02 \
2479          fixed: 1 1; \
2480       ) \
2481    )
2482
2483 #define GENLIST_PART_ICON_BTN_ONOFF_R(NAME, RIGHT) \
2484    GENLIST_PART_ICON(NAME, \
2485       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2486          GENLIST_PARAM_ICON_ONOFF_WIDTH \
2487          fixed: 1 1; \
2488       ) \
2489    )
2490
2491 #define GENLIST_PART_ICON_BTN_ONOFF_L(NAME, LEFT) \
2492    GENLIST_PART_ICON(NAME, \
2493       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2494          GENLIST_PARAM_ICON_ONOFF_WIDTH \
2495          fixed: 1 1; \
2496       ) \
2497    )
2498
2499 #define GENLIST_PART_ICON_THUMBNAIL1_R(NAME, RIGHT) \
2500    GENLIST_PART_ICON(NAME, \
2501       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2502          GENLIST_PARAM_ICON_THUMBNAIL1 \
2503          fixed: 1 1; \
2504       ) \
2505    )
2506
2507 #define GENLIST_PART_ICON_CHECK_RADIO_L(NAME, LEFT) \
2508    GENLIST_PART_ICON(NAME, \
2509       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2510          GENLIST_PARAM_ICON_CHECK_RADIO \
2511          fixed: 1 1; \
2512       ) \
2513    )
2514
2515 #define GENLIST_PART_ICON_STAR_RTB(NAME, RIGHT, TOP, BOTTOM) \
2516    GENLIST_PART_ICON(NAME, \
2517       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
2518          GENLIST_PARAM_ICON_STAR \
2519          fixed: 1 1; \
2520       ) \
2521    )
2522
2523 /*****************************************************************************/
2524 /******************************* Genlist IMAGE ********************************/
2525 /*****************************************************************************/
2526 #define GENLIST_PART_IMAGE(NAME, DESCRIPION) \
2527    part { name: NAME; \
2528       scale: 1; \
2529       type: IMAGE; \
2530       DESCRIPION \
2531    }
2532
2533 #define GENLIST_PARAM_PASSWORD_IMAGE \
2534             min: GENLIST_ICON_PASSWORD_SIZE GENLIST_ICON_PASSWORD_SIZE; \
2535             max: GENLIST_ICON_PASSWORD_SIZE GENLIST_ICON_PASSWORD_SIZE; \
2536             image.normal: "00_search_edit_field_bg_02.png"; \
2537             image.border: 12 13 12 13; \
2538             image.border_scale: 1;
2539
2540 /*****************************************************************************/
2541 /******************************* Genlist Bubble ********************************/
2542 /*****************************************************************************/
2543 #define GENLIST_IMAGES_EXPANDABLE_BTN \
2544          images { \
2545             image: "00_button_expand_closed.png" COMP; \
2546             image: "00_button_expand_opened.png" COMP; \
2547          }
2548
2549 #define GENLIST_PART_EXPANDABLE_ARROW \
2550          GENLIST_PART_ICON("touch_arrow", \
2551             ignore_flags: ON_HOLD; \
2552             GENLIST_DESCRIPTION_ENVELOP("arrow", ) \
2553          ) \
2554          GENLIST_PART_RECT("arrow_clip", \
2555             GENLIST_DESCRIPTION_ENVELOP("arrow", \
2556                color: 101 101 101 255; \
2557             ) \
2558             description { state: "disabled" 0.0; \
2559                color: 101 101 101 76; \
2560             } \
2561             description { state: "expand_opened_press" 0.0; \
2562                color: 248 246 239 255; \
2563             } \
2564             description { state: "default_press" 0.0; \
2565                color: 248 246 239 255; \
2566             } \
2567          ) \
2568          GENLIST_PART_IMAGE("arrow", \
2569             clip_to: "arrow_clip"; \
2570             ignore_flags: ON_HOLD; \
2571             mouse_events: 0; \
2572             GENLIST_DESCRIPTION_R("elm.padding.right", \
2573                fixed: 1 1; \
2574                min: 45 45; \
2575                max: 45 45; \
2576                image.normal: "00_button_expand_closed.png"; \
2577             ) \
2578             description { state: "default_press" 0.0; \
2579                inherit: "default" 0.0; \
2580                image.normal: "00_button_expand_closed_press.png"; \
2581             } \
2582             description { state: "expand_opened" 0.0; \
2583                inherit: "default" 0.0; \
2584                image.normal: "00_button_expand_opened.png"; \
2585             } \
2586             description { state: "expand_opened_press" 0.0; \
2587                inherit: "expand_opened" 0.0; \
2588                image.normal: "00_button_expand_opened_press.png"; \
2589             } \
2590          )
2591 /*****************************************************************************/
2592 /******************************* Genlist RECT ********************************/
2593 /*****************************************************************************/
2594 #define GENLIST_PART_SPACER(NAME, DESCRIPION) \
2595     part { name: NAME; \
2596       scale: 1; \
2597       mouse_events: 0; \
2598       type: SPACER; \
2599       DESCRIPION \
2600    }
2601
2602 #define GENLIST_PART_RECT(NAME, DESCRIPION) \
2603     part { name: NAME; \
2604       scale: 1; \
2605       type: RECT; \
2606       DESCRIPION \
2607    }
2608
2609 /*****************************************************************************/
2610 /******************************* Genlist TEXT ********************************/
2611 /*****************************************************************************/
2612 #define GENLIST_PART_TEXT(NAME, DESCRIPION) \
2613     part { name: NAME; \
2614       scale: 1; \
2615       type: TEXT; \
2616       DESCRIPION \
2617    }
2618
2619 #define GENLIST_PART_TEXTBLOCK(NAME, DESCRIPION) \
2620     part { name: NAME; \
2621       scale: 1; \
2622       type: TEXTBLOCK; \
2623       DESCRIPION \
2624    }
2625
2626 /*************************** parameters **********************************/
2627 #define GENLIST_PARAM_TEXT_LIMIT_RB \
2628    rel1.to_x: "base"; /* This limits text growing. */\
2629    rel1.relative: 0.35 0; /* This limits text growing. */\
2630    text.max: 1 0; /* This limits text growing. */
2631
2632 #define GENLIST_PARAM_TEXT_LIMIT_RT \
2633    rel1.to_x: "base"; /* This limits text growing. */\
2634    rel1.relative: 0.35 1; /* This limits text growing. */\
2635    text.max: 1 0; /* This limits text growing. */
2636
2637 #define GENLIST_PARAM_TEXT_LIMIT_RTB \
2638    rel1.to_x: "base"; /* This limits text growing. */\
2639    rel1.relative: 0.35 1; /* This limits text growing. */\
2640    text.max: 1 0; /* This limits text growing. */
2641
2642 // Group Title
2643 #define GENLIST_PARAM_DIALOGUE_GROUP_TITLE \
2644    color: GENLIST_DIALOGUE_GROUP_TITLE_COLOR; \
2645    text { \
2646       align: 0.0 0.5; \
2647       font: "Tizen:style=Bold"; \
2648       min: 0 1; \
2649       size: GENLIST_DIALOGUE_GROUP_TITLE_SIZE; \
2650       text_class: "list_item"; \
2651    }
2652
2653 // Password style
2654 #define GENLIST_PARAM_PASSWORD_TITLE \
2655    color: DIALOGUE_PASSWORD_TITLE_COLOR; \
2656    text { \
2657       font: "Tizen:style=Bold"; \
2658       size: DIALOGUE_PASSWORD_TITLE_SIZE; \
2659       min: 0 1; \
2660       align: 0 0.5; \
2661       text_class: "list_item"; \
2662    }
2663
2664 // Progress main text
2665 #define GENLIST_PARAM_PROGRESS_MAIN \
2666    color: GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR; \
2667    text { \
2668       align: 0 0.5; \
2669       min: 0 1; \
2670       font: "Tizen:style=Regular"; \
2671       size: GENLIST_PROGRESS_MAIN_TEXT_SIZE; \
2672       text_class: "list_item"; \
2673    }
2674
2675 // list main text
2676 #define GENLIST_PARAM_LISTITEM \
2677    color: GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR; \
2678    text { \
2679       align: 0 0.5; \
2680       min: 0 1; \
2681       font: "Tizen:style=Regular"; \
2682       size: GENLIST_LIST_MAIN_TEXT_SIZE; \
2683       text_class: "list_item"; \
2684    }
2685
2686 #define GENLIST_PARAM_LISTITEM_TB \
2687    text { \
2688       min: 0 1; \
2689       style: "genlist_style_list_main_text_unread"; \
2690    }
2691
2692 #define GENLIST_PARAM_LISTITEM_TB_WRAP \
2693    text { \
2694       min: 0 1; \
2695       style: "genlist_style_list_main_text_unread_wrap"; \
2696    }
2697
2698 // list subtext
2699 #define GENLIST_PARAM_SUBITEM_DEFAULT \
2700    color: GENLIST_LIST_SUB_TEXT_DEFAULT_COLOR; \
2701    text { \
2702       align: 0 0.5; \
2703       min: 0 1; \
2704       font: "Tizen:style=Bold"; \
2705       size: GENLIST_LIST_SUB_TEXT_SIZE; \
2706       text_class: "tizen"; \
2707    }
2708
2709 #define GENLIST_PARAM_SUBITEM_SETTINGS \
2710    color: GENLIST_LIST_SUB_TEXT_SETTINGS_COLOR; \
2711    text { \
2712       align: 0 0.5; \
2713       min: 0 1; \
2714       font: "Tizen:style=Bold"; \
2715       size: GENLIST_LIST_SUB_TEXT_SIZE; \
2716       text_class: "tizen"; \
2717    }
2718
2719 #define GENLIST_PARAM_SUBITEM_DEFAULT_TB \
2720    text { \
2721       min: 0 1; \
2722       style: "genlist_style_list_sub_text_default"; \
2723    }
2724
2725 #define GENLIST_PARAM_SUBITEM_DEFAULT_TB_WRAP \
2726    text { \
2727       min: 0 1; \
2728       style: "genlist_style_list_sub_text_default_wrap"; \
2729    }
2730
2731 #define GENLIST_PARAM_SUBITEM_SETTINGS_TB \
2732    text { \
2733       min: 0 1; \
2734       style: "genlist_style_list_sub_text_settings"; \
2735    }
2736
2737 // list subtext 02
2738 #define GENLIST_PARAM_SUBITEM_02 \
2739    color: GENLIST_LIST_SUB_TEXT_02_COLOR; \
2740    text { \
2741       align: 0 0.5; \
2742       min: 0 1; \
2743       font: "Tizen:style=Bold"; \
2744       size: GENLIST_LIST_SUB_TEXT_02_SIZE; \
2745       text_class: "tizen"; \
2746    }
2747
2748 // Dialogue group - Apps
2749 #define GENLIST_PARAM_APPS_NAME\
2750    color: GENLIST_APPS_NAME_COLOR; \
2751    text { \
2752       align: 0 0.5; \
2753       min: 0 1; \
2754       font: "Tizen:style=Bold"; \
2755       size: GENLIST_APPS_NAME_SIZE; \
2756       text_class: "list_item"; \
2757    }
2758
2759 #define GENLIST_PARAM_APPS_INC\
2760    color: GENLIST_APPS_INC_COLOR; \
2761    text { \
2762       align: 0 0.5; \
2763       min: 0 1; \
2764       font: "Tizen:style=Bold"; \
2765       size: GENLIST_APPS_INC_SIZE; \
2766       text_class: "list_item"; \
2767    }
2768
2769 #define GENLIST_PARAM_APPS_RATING\
2770    color: GENLIST_APPS_RATING_COLOR; \
2771    text { \
2772       align: 0 0.5; \
2773       min: 0 1; \
2774       font: "Tizen:style=Bold"; \
2775       size: GENLIST_APPS_RATING_SIZE; \
2776       text_class: "list_item"; \
2777    }
2778
2779 #define GENLIST_PARAM_APPS_PRICE\
2780    color: GENLIST_APPS_PRICE_ORIGINAL_COLOR; \
2781    text { \
2782       align: 0 0.5; \
2783       min: 0 1; \
2784       font: "Tizen:style=Bold"; \
2785       size: GENLIST_APPS_PRICE_SIZE; \
2786       text_class: "list_item"; \
2787    }
2788
2789 #define GENLIST_PARAM_APPS_PRICE_SALE\
2790    color: GENLIST_APPS_PRICE_SALE_COLOR; \
2791    text { \
2792       align: 0 0.5; \
2793       min: 0 1; \
2794       font: "Tizen:style=Bold"; \
2795       size: GENLIST_APPS_PRICE_SIZE; \
2796       text_class: "list_item"; \
2797    }
2798
2799 #define GENLIST_PARAM_CONTENTS_TEXT \
2800    color: GENLIST_CONTENTS_TEXT_COLOR; \
2801    text { \
2802       align: 0 0.5; \
2803       min: 0 1; \
2804       font: "Tizen:style=Regular"; \
2805       size: GENLIST_CONTENTS_TEXT_SIZE; \
2806       text_class: "tizen"; \
2807    }
2808
2809 /*************************** Descriptions **********************************/
2810 // list main text
2811 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2812    description { state: "disabled" 0.0; \
2813       inherit: "default" 0.0; \
2814       color: GENLIST_LIST_MAIN_TEXT_UNREAD_DIM_COLOR; \
2815    } \
2816    description { state: "read" 0.0; \
2817       inherit: "default" 0.0; \
2818       color: GENLIST_LIST_MAIN_TEXT_READ_COLOR; \
2819    } \
2820    description { state: "read,disabled" 0.0; \
2821       inherit: "default" 0.0; \
2822       color: GENLIST_LIST_MAIN_TEXT_READ_DIM_COLOR; \
2823    } \
2824    description { state: "selected" 0.0; \
2825       inherit: "default" 0.0; \
2826       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2827    }
2828
2829 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2830    description { state: "disabled" 0.0; \
2831       inherit: "default" 0.0; \
2832       text.style: "genlist_style_list_main_text_unread_dim"; \
2833    } \
2834    description { state: "read" 0.0; \
2835       inherit: "default" 0.0; \
2836       text.style: "genlist_style_list_main_text_read"; \
2837    } \
2838    description { state: "read,disabled" 0.0; \
2839       inherit: "default" 0.0; \
2840       text.style: "genlist_style_list_main_text_read_dim"; \
2841    } \
2842    description { state: "selected" 0.0; \
2843       inherit: "default" 0.0; \
2844       text.style: "genlist_style_list_main_text_focus"; \
2845    }
2846
2847 // list sub text
2848 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2849    description { state: "disabled" 0.0; \
2850       inherit: "default" 0.0; \
2851       color: GENLIST_LIST_SUB_TEXT_DEFAULT_DIM_COLOR; \
2852    } \
2853    description { state: "selected" 0.0; \
2854       inherit: "default" 0.0; \
2855       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2856    }
2857
2858 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
2859    description { state: "disabled" 0.0; \
2860       inherit: "default" 0.0; \
2861       text.style: "genlist_style_list_sub_text_default_dim"; \
2862    } \
2863    description { state: "selected" 0.0; \
2864       inherit: "default" 0.0; \
2865       text.style: "genlist_style_list_sub_text_focus"; \
2866    }
2867
2868 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB_WRAP \
2869    description { state: "disabled" 0.0; \
2870       inherit: "default" 0.0; \
2871       text.style: "genlist_style_list_sub_text_default_dim_wrap"; \
2872    } \
2873    description { state: "selected" 0.0; \
2874       inherit: "default" 0.0; \
2875       text.style: "genlist_style_list_sub_text_focus_wrap"; \
2876    }
2877
2878 #define GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
2879    description { state: "disabled" 0.0; \
2880       inherit: "default" 0.0; \
2881       color: GENLIST_LIST_SUB_TEXT_SETTINGS_DIM_COLOR; \
2882    } \
2883    description { state: "selected" 0.0; \
2884       inherit: "default" 0.0; \
2885       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2886    }
2887
2888 #define GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS_TB \
2889    description { state: "disabled" 0.0; \
2890       inherit: "default" 0.0; \
2891       text.style: "genlist_style_list_sub_text_settings_dim"; \
2892    } \
2893    description { state: "selected" 0.0; \
2894       inherit: "default" 0.0; \
2895       text.style: "genlist_style_list_sub_text_focus"; \
2896    }
2897
2898 // list main text multiline
2899 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB_WRAP \
2900    description { state: "disabled" 0.0; \
2901       inherit: "default" 0.0; \
2902       text.style: "genlist_style_list_main_text_unread_dim_wrap"; \
2903    } \
2904    description { state: "selected" 0.0; \
2905       inherit: "default" 0.0; \
2906       text.style: "genlist_style_list_main_text_focus_wrap"; \
2907    }
2908
2909 /*************************** Parts **********************************/
2910 #define GENLIST_PART_DIALOGUE_GROUP_HELP_TEXT(NAME, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2911    GENLIST_PART_TEXTBLOCK(NAME, \
2912       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2913          text { \
2914             min: 0 1; \
2915             style: "genlist_style_dialogue_group_help_text"; \
2916          } \
2917          PARAM) \
2918    )
2919
2920 #define GENLIST_PART_LISTITEM(NAME, DESCRIPTION) \
2921    GENLIST_PART_TEXT(NAME, \
2922       DESCRIPTION \
2923       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2924    )
2925
2926 #define GENLIST_PART_LISTITEM_TB(NAME, DESCRIPTION) \
2927    GENLIST_PART_TEXTBLOCK(NAME, \
2928       DESCRIPTION \
2929       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2930    )
2931
2932 #define GENLIST_PART_LISTITEM_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2933    GENLIST_PART_TEXT(NAME, \
2934       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2935          min: 0 HEIGHT; \
2936          GENLIST_PARAM_LISTITEM \
2937          PARAM \
2938       ) \
2939       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2940    )
2941
2942 #define GENLIST_PART_LISTITEM_TB_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2943    GENLIST_PART_TEXTBLOCK(NAME, \
2944       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2945          min: 0 HEIGHT; \
2946          fixed: 1 0; \
2947          GENLIST_PARAM_LISTITEM_TB \
2948          PARAM \
2949       ) \
2950       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2951    )
2952
2953 #define GENLIST_PART_LISTITEM_LR(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
2954    GENLIST_PART_TEXT(NAME, \
2955       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
2956          min: 0 HEIGHT; \
2957          GENLIST_PARAM_LISTITEM \
2958          PARAM \
2959       ) \
2960       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2961    )
2962
2963 #define GENLIST_PART_LISTITEM_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP, PARAM) \
2964    GENLIST_PART_TEXT(NAME, \
2965       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
2966          min: 0 HEIGHT; \
2967          fixed: 0 1; \
2968          GENLIST_PARAM_LISTITEM \
2969          PARAM \
2970       ) \
2971       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2972    )
2973
2974 #define GENLIST_PART_LISTITEM_LRT_TB(NAME, HEIGHT, LEFT, RIGHT, TOP, PARAM) \
2975    GENLIST_PART_TEXTBLOCK(NAME, \
2976       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
2977          min: 0 HEIGHT; \
2978          fixed: 0 1; \
2979          GENLIST_PARAM_LISTITEM_TB \
2980          PARAM \
2981       ) \
2982       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2983    )
2984
2985 #define GENLIST_PART_LISTITEM_LR_TB(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
2986    GENLIST_PART_TEXTBLOCK(NAME, \
2987       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
2988          min: 0 HEIGHT; \
2989          fixed: 1 0; \
2990          GENLIST_PARAM_LISTITEM_TB \
2991          PARAM \
2992       ) \
2993       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2994    )
2995
2996 #define GENLIST_PART_SUBITEM_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2997    GENLIST_PART_TEXT(NAME, \
2998       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2999          min: 0 HEIGHT; \
3000          GENLIST_PARAM_SUBITEM_DEFAULT \
3001          PARAM \
3002       ) \
3003       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3004    )
3005
3006 #define GENLIST_PART_SUBITEM(NAME, DESCRIPTION) \
3007    GENLIST_PART_TEXT(NAME, \
3008       DESCRIPTION \
3009       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3010    )
3011
3012 #define GENLIST_PART_SUBITEM_R(NAME, HEIGHT, RIGHT) \
3013    GENLIST_PART_TEXT(NAME, \
3014       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
3015          min: 0 HEIGHT; \
3016          fixed: 1 0; \
3017          GENLIST_PARAM_TEXT_LIMIT_RB \
3018          GENLIST_PARAM_SUBITEM_DEFAULT \
3019       ) \
3020       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3021    )
3022
3023 #define GENLIST_PART_SUBITEM_RB(NAME, HEIGHT, RIGHT, BOTTOM) \
3024    GENLIST_PART_TEXT(NAME, \
3025       GENLIST_DESCRIPTION_RB(RIGHT, BOTTOM, \
3026          min: 0 HEIGHT; \
3027          fixed: 1 1; \
3028          GENLIST_PARAM_TEXT_LIMIT_RB \
3029          GENLIST_PARAM_SUBITEM_DEFAULT \
3030       ) \
3031       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3032    )
3033
3034 #define GENLIST_PART_SUBITEM_RB_TB(NAME, HEIGHT, RIGHT, BOTTOM) \
3035    GENLIST_PART_TEXTBLOCK(NAME, \
3036       GENLIST_DESCRIPTION_RB(RIGHT, BOTTOM, \
3037          min: 0 HEIGHT; \
3038          GENLIST_PARAM_TEXT_LIMIT_RB \
3039          fixed: 1 1; \
3040          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3041       ) \
3042       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3043    )
3044
3045 #define GENLIST_PART_SUBITEM_TB_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM) \
3046    GENLIST_PART_TEXTBLOCK(NAME, \
3047       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
3048          min: 0 HEIGHT; \
3049          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3050       ) \
3051       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3052    )
3053
3054 #define GENLIST_PART_SUBITEM_R_FIXED(NAME, WIDTH, HEIGHT, RIGHT) \
3055    GENLIST_PART_TEXT(NAME, \
3056       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
3057          min: WIDTH HEIGHT; \
3058          fixed: 1 1; \
3059          GENLIST_PARAM_SUBITEM_DEFAULT \
3060       ) \
3061       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3062    )
3063
3064 #define GENLIST_PART_SUBITEM_R_FIXED_TB(NAME, WIDTH, HEIGHT, RIGHT) \
3065    GENLIST_PART_TEXTBLOCK(NAME, \
3066        GENLIST_DESCRIPTION_R(RIGHT, \
3067          min: WIDTH HEIGHT; \
3068          fixed: 1 0; \
3069          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3070       ) \
3071       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3072    )
3073
3074 #define GENLIST_PART_SUBITEM_L_FIXED(NAME, WIDTH, HEIGHT, LEFT) \
3075    GENLIST_PART_TEXT(NAME, \
3076       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
3077          min: WIDTH HEIGHT; \
3078          fixed: 1 1; \
3079          GENLIST_PARAM_SUBITEM_DEFAULT \
3080       ) \
3081       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3082    )
3083
3084 #define GENLIST_PART_SUBITEM_LR(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
3085    GENLIST_PART_TEXT(NAME, \
3086       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
3087          min: 0 HEIGHT; \
3088          GENLIST_PARAM_SUBITEM_DEFAULT \
3089          PARAM \
3090       ) \
3091       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3092    )
3093
3094 #define GENLIST_PART_SUBITEM_LR_TB(NAME, HEIGHT, LEFT, RIGHT) \
3095    GENLIST_PART_TEXTBLOCK(NAME, \
3096       GENLIST_DESCRIPTION_LR(LEFT, RIGHT, \
3097          min: 0 HEIGHT; \
3098          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3099       ) \
3100       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3101    )
3102
3103 #define GENLIST_PART_SUBITEM_LB(NAME, HEIGHT, LEFT, RIGHT) \
3104    GENLIST_PART_TEXT(NAME, \
3105       GENLIST_DESCRIPTION_LB(LEFT, BOTTOM, \
3106          min: 0 HEIGHT; \
3107          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3108       ) \
3109       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3110    )
3111
3112 #define GENLIST_PART_SUBITEM_LRB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3113    GENLIST_PART_TEXT(NAME, \
3114       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3115          min: 0 HEIGHT; \
3116          GENLIST_PARAM_SUBITEM_DEFAULT \
3117          fixed: 0 1; \
3118       ) \
3119       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3120    )
3121
3122 #define GENLIST_PART_SUBITEM_SETTINGS_LRB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM, PARAM) \
3123    GENLIST_PART_TEXT(NAME, \
3124       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3125          min: 0 HEIGHT; \
3126          fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
3127          GENLIST_PARAM_SUBITEM_SETTINGS\
3128          PARAM; \
3129       ) \
3130       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
3131    )
3132
3133 #define GENLIST_PART_SUBITEM_LRB_TB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3134    GENLIST_PART_TEXTBLOCK(NAME, \
3135       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3136          min: 0 HEIGHT; \
3137          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3138          fixed: 0 1; \
3139       ) \
3140       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3141    )
3142
3143 #define GENLIST_PART_SUBITEM_SETTINGS_LRB_TB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3144    GENLIST_PART_TEXTBLOCK(NAME, \
3145       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3146          min: 0 HEIGHT; \
3147          GENLIST_PARAM_SUBITEM_SETTINGS_TB \
3148          fixed: 0 1; \
3149       ) \
3150       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS_TB \
3151    )
3152
3153 #define GENLIST_PART_SUBITEM_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP) \
3154    GENLIST_PART_TEXT(NAME, \
3155       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
3156          min: 0 HEIGHT; \
3157          fixed: 0 1; \
3158          GENLIST_PARAM_SUBITEM_DEFAULT \
3159       ) \
3160       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3161    )
3162
3163 #define GENLIST_PART_SUBITEM_SETTINGS_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP) \
3164    GENLIST_PART_TEXT(NAME, \
3165       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
3166          min: 0 HEIGHT; \
3167          fixed: 0 1; \
3168          GENLIST_PARAM_SUBITEM_SETTINGS \
3169       ) \
3170       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
3171    )
3172
3173 #define GENLIST_PART_SUBITEM_LTB(NAME, HEIGHT, LEFT, TOP, BOTTOM) \
3174    GENLIST_PART_TEXT(NAME, \
3175       GENLIST_DESCRIPTION_LTB(LEFT, TOP, BOTTOM, \
3176          min: 0 HEIGHT; \
3177          fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
3178          GENLIST_PARAM_SUBITEM_DEFAULT \
3179       ) \
3180       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3181    )
3182
3183 #define GENLIST_PART_SUBITEM_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3184    GENLIST_PART_TEXT(NAME, \
3185       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3186          min: 0 HEIGHT; \
3187          GENLIST_PARAM_TEXT_LIMIT_RT \
3188          GENLIST_PARAM_SUBITEM_DEFAULT \
3189          fixed: 1 0; \
3190       ) \
3191       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3192    )
3193
3194 #define GENLIST_PART_SUBITEM_RTB_TB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3195    GENLIST_PART_TEXTBLOCK(NAME, \
3196       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3197          min: 0 HEIGHT; \
3198          GENLIST_PARAM_TEXT_LIMIT_RT \
3199          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3200          fixed: 1 0; \
3201       ) \
3202       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3203    )
3204
3205 #define GENLIST_PART_SUBITEM_02_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3206    GENLIST_PART_TEXT(NAME, \
3207       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3208          min: 0 HEIGHT; \
3209          GENLIST_PARAM_TEXT_LIMIT_RT \
3210          GENLIST_PARAM_SUBITEM_02 \
3211          fixed: 1 0; \
3212       ) \
3213       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3214    )
3215
3216 #define GENLIST_PARAM_LIST_BUBBLE_TEXT \
3217    color: GENLIST_LIST_BUBBLE_TEXT_COLOR; \
3218    text { \
3219       align: 1 0.5; \
3220       min: 0 1; \
3221       font: "Tizen:style=Bold"; \
3222       size: GENLIST_LIST_BUBBLE_TEXT_SIZE; \
3223       text_class: "tizen"; \
3224    }
3225
3226 // FIXME: Need to find why rel2.offset: 9 -1 will not fix the alignment of bubble text ?
3227 #define GENLIST_PART_LIST_BUBBLE_TEXT_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3228          GENLIST_PART_IMAGE("elm.bubble", \
3229             GENLIST_DESCRIPTION_ENVELOP(NAME, \
3230                image { \
3231                   normal: "00_list_bubble_bg.png"; \
3232                   border: 8 8 0 0; \
3233                } \
3234                rel1.offset: -10 0; \
3235                rel2.offset: 8 -1; \
3236                min: 48 38; \
3237                max: -1 38; \
3238                fixed: 0 1; \
3239                color: GENLIST_LIST_BUBBLE_COLOR; \
3240             ) \
3241             description { state: "selected" 0.0; \
3242                inherit: "default" 0.0; \
3243                color: GENLIST_LIST_BUBBLE_PRESS_COLOR; \
3244             } \
3245          ) \
3246          GENLIST_PART_TEXT(NAME, \
3247             GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3248                min: 0 HEIGHT; \
3249                GENLIST_PARAM_TEXT_LIMIT_RT \
3250                rel2.offset: -10 -1; /* This maintain the text alignment with bubble text. */\
3251                GENLIST_PARAM_LIST_BUBBLE_TEXT \
3252             ) \
3253             description { state: "selected" 0.0; \
3254                inherit: "default" 0.0; \
3255                color: GENLIST_LIST_BUBBLE_TEXT_FOCUS_COLOR; \
3256             } \
3257          )
3258
3259 #if 0
3260 #define GENLIST_PART_BASE__( param_item_height ) \
3261          part { name: "base"; \
3262             type: RECT; \
3263             repeat_events: 1; \
3264             scale: 1; \
3265             description { state: "default" 0.0; \
3266                min: 0 param_item_height; \
3267                color: LAYOUT_GROUP_LIST_BG_COLOR_INC; \
3268             } \
3269          }
3270
3271 /******************************************************************************/
3272 /** ETC
3273 /******************************************************************************/
3274 // FIXME: UX do not define selected state. But I thinkt that it is neededs :(
3275
3276 #define GENLIST_PROOGRAM_EXPAND(SRC, TARGET) \
3277    program { \
3278       name: "expand"; \
3279       signal: "mouse,clicked,1"; \
3280       source: SRC; \
3281       action: SIGNAL_EMIT "elm,action,expand,toggle" "elm"; \
3282    } \
3283    program { \
3284       name: "go_expanded"; \
3285       signal: "elm,state,expanded"; \
3286       source: "elm"; \
3287       action: STATE_SET "active" 0.0; \
3288       TARGET \
3289    } \
3290    program { \
3291       name: "go_contracted"; \
3292       signal: "elm,state,contracted"; \
3293       source: "elm"; \
3294       action: STATE_SET "default" 0.0; \
3295       TARGET \
3296    }
3297
3298 #define GENLIST_PART_BASE_LIST_H( HEIGHT) \
3299          part { name: "base"; \
3300             type: RECT; \
3301             repeat_events: 1; \
3302             scale: 1; \
3303             description { state: "default" 0.0; \
3304                align: 0.5 0.5; \
3305                color: 0 0 0 0; \
3306                rel2.relative: 1 0; \
3307                rel2.to: "bottom_line"; \
3308                min: 0 HEIGHT; \
3309             } \
3310          } \
3311          GENLIST_PART_BOTTOM_LINE
3312
3313 #define GENLIST_PART_DIALOGUE_ITEM \
3314          part { name: "elm.rect.dialogue"; \
3315             type: RECT; \
3316             scale: 1; \
3317             description { state: "default" 0.0; \
3318                min: 10 0; \
3319                fixed: 1 0; \
3320                color: GENLIST_DIALOGUE_GROUP_LEFT_BG_COLOR_INC; \
3321                rel2.relative: 0.0 1.0; \
3322                align: 0.0 0.0; \
3323             } \
3324          }
3325
3326 #define GENLIST_PART_DIALOGUE_RIGHT_LINE \
3327          part { name: "elm.rect.dialogue.right.line"; \
3328             type: RECT; \
3329             scale: 1; \
3330             description { state: "default" 0.0; \
3331                min: 1 0; \
3332                fixed: 1 0; \
3333                rel1 { \
3334                   relative: 1.0  0.0; \
3335                   offset: -1 0; \
3336                } \
3337                align: 1.0 0.0; \
3338                color: GENLIST_LIST_LINE1_COLOR; \
3339             } \
3340          }
3341
3342 #define GENLIST_PROGRAM_FLIP_1TEXT \
3343          program { name: "flipped"; \
3344             signal: "elm,state,flip,enabled"; \
3345             source: "elm"; \
3346             action: STATE_SET "flipped" 0.0; \
3347             target: "elm.text"; \
3348             target: "elm.flip.content"; \
3349          } \
3350          program { name: "flip_disabled"; \
3351             signal: "elm,state,flip,disabled"; \
3352             source: "elm"; \
3353             action: STATE_SET "default" 0.0; \
3354             target: "elm.text"; \
3355             target: "elm.flip.content"; \
3356          }
3357
3358 #define GENLIST_PROGRAM_FLIP_2TEXT \
3359          program { name: "flipped"; \
3360             signal: "elm,state,flip,enabled"; \
3361             source: "elm"; \
3362             action: STATE_SET "flipped" 0.0; \
3363             target: "elm.text.1"; \
3364             target: "elm.text.2"; \
3365             target: "elm.flip.content"; \
3366          } \
3367          program { name: "flip_disabled"; \
3368             signal: "elm,state,flip,disabled"; \
3369             source: "elm"; \
3370             action: STATE_SET "default" 0.0; \
3371             target: "elm.text.1"; \
3372             target: "elm.text.2"; \
3373             target: "elm.flip.content"; \
3374          }
3375
3376 #define GENLIST_PROGRAM_FLIP_2TEXT_1ICON \
3377          program { name: "flipped"; \
3378             signal: "elm,state,flip,enabled"; \
3379             source: "elm"; \
3380             action: STATE_SET "flipped" 0.0; \
3381             target: "elm.text.1"; \
3382             target: "elm.text.2"; \
3383             target: "elm.icon"; \
3384             target: "elm.flip.content"; \
3385          } \
3386          program { name: "flip_disabled"; \
3387             signal: "elm,state,flip,disabled"; \
3388             source: "elm"; \
3389             action: STATE_SET "default" 0.0; \
3390             target: "elm.text.1"; \
3391             target: "elm.text.2"; \
3392             target: "elm.icon"; \
3393             target: "elm.flip.content"; \
3394          }
3395
3396 #define GENLIST_PROGRAM_FLIP_2TEXT_2ICON \
3397          program { name: "flipped"; \
3398             signal: "elm,state,flip,enabled"; \
3399             source: "elm"; \
3400             action: STATE_SET "flipped" 0.0; \
3401             target: "elm.text.1"; \
3402             target: "elm.text.2"; \
3403             target: "elm.icon.1"; \
3404             target: "elm.icon.2"; \
3405             target: "elm.flip.content"; \
3406          } \
3407          program { name: "flip_disabled"; \
3408             signal: "elm,state,flip,disabled"; \
3409             source: "elm"; \
3410             action: STATE_SET "default" 0.0; \
3411              target: "elm.text.1"; \
3412             target: "elm.text.2"; \
3413             target: "elm.icon.1"; \
3414             target: "elm.icon.2"; \
3415             target: "elm.flip.content"; \
3416          }
3417
3418 #define GENLIST_PROGRAM_FLIP_3TEXT_2ICON \
3419          program { name: "flipped"; \
3420             signal: "elm,state,flip,enabled"; \
3421             source: "elm"; \
3422             action: STATE_SET "flipped" 0.0; \
3423             target: "elm.text.1"; \
3424             target: "elm.text.2"; \
3425             target: "elm.text.3"; \
3426             target: "elm.icon.1"; \
3427             target: "elm.icon.2"; \
3428             target: "elm.flip.content"; \
3429          } \
3430          program { name: "flip_disabled"; \
3431             signal: "elm,state,flip,disabled"; \
3432             source: "elm"; \
3433             action: STATE_SET "default" 0.0; \
3434             target: "elm.text.1"; \
3435             target: "elm.text.2"; \
3436             target: "elm.text.3"; \
3437             target: "elm.icon.1"; \
3438             target: "elm.icon.2"; \
3439             target: "elm.flip.content"; \
3440          }
3441
3442
3443 #define GENLIST_DESCRIPTION_INVISIBLE_SELECTED \
3444             description { state: "selected" 1.0; \
3445                inherit: "default" 0.0; \
3446                visible: 0; \
3447             }
3448
3449 #define GENLIST_DESCRIPTION_FLIP_ENABLED \
3450             description { state: "flipped" 0.0; \
3451                inherit: "default" 0.0; \
3452                visible: 0; \
3453             }
3454
3455 #define GENLIST_PROGRAM_SCRIPT_FLIP_SELECT_1TEXT \
3456             script { \
3457                new st[31]; \
3458                new Float:vl; \
3459                get_state(PART:"elm.text", st, 30, vl); \
3460                set_state(PART:"bg", "selected", 0.0); \
3461                if (!strcmp(st, "flipped")) \
3462                   set_state(PART:"elm.text", "selected", 1.0); \
3463                else \
3464                   set_state(PART:"elm.text", "selected", 0.0); \
3465             }
3466
3467
3468 /* genlist multisense macro - start */
3469 #define GENLIST_PROGRAM_AFTER_PLAY_BUTTON_PRESS \
3470             after: "play_button_press";
3471
3472 #define GENLIST_PROGRAM_PLAY_BUTTON_PRESS \
3473          program { name: "play_button_press"; \
3474             action: PLAY_SAMPLE "button-pressed" 1.0; \
3475          }
3476 #endif