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