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