genlist: Remove all of elm.image.rename, elm.icon.eraser parts, programs. These parts...
[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
2254 #define GENLIST_PROGRAMS_DIALOGUE_ENTRY( TARGET ) \
2255    GENLIST_PROGRAM_DEFAULT( TARGET \
2256       target: "bg_dialogue"; \
2257       target: "bg_dialogue_clip"; \
2258       target: "elm.padding.left"; \
2259       target: "elm.padding.right"; \
2260    ) \
2261    GENLIST_PROGRAM_DISABLED( TARGET ) \
2262    GENLIST_PROGRAM_FOCUS_DIALOGUE \
2263    program { name: "bg_color_change"; \
2264       signal: "bg_color_change"; \
2265       source: "elm"; \
2266       action: STATE_SET "2depth" 0.0; \
2267       target: "bg_dialogue_clip"; \
2268    } \
2269    GENLIST_PROGRAM_DECORATE_REORDER( "normal", TARGET \
2270       target: "elm.padding.left"; \
2271       target: "elm.padding.right"; \
2272    ) \
2273    GENLIST_PROGRAM_FLIP \
2274    GENLIST_PROGRAM_EDITMODE
2275
2276
2277 #define GENLIST_PROGRAMS_THUMB \
2278    GENLIST_PROGRAM_DECORATE_REORDER( "thumb", target: "elm.thumb"; ) \
2279    GENLIST_PROGRAM_FLIP_TARGET( target: "elm.thumb.clip"; ) \
2280    program { name: "enabled_thumb"; \
2281       signal: "elm,state,enabled"; \
2282       source: "elm"; \
2283       action: STATE_SET "default" 0.0; \
2284       target: "base"; \
2285       target: "elm.thumb"; \
2286    } \
2287    program { name: "disabled_thumb"; \
2288       signal: "elm,state,disabled"; \
2289       source: "elm"; \
2290       action: STATE_SET "disabled" 0.0; \
2291       target: "base"; \
2292       target: "elm.thumb"; \
2293    } \
2294    program { name: "selected_thumb"; \
2295       signal: "elm,state,selected"; \
2296       source: "elm"; \
2297       script { \
2298          new st[31]; \
2299          new Float:vl; \
2300          get_state(PART:"elm.thumb", st, 30, vl); \
2301          if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) \
2302             set_state(PART:"elm.thumb", "reorder_selected", 0.0); \
2303          else \
2304             set_state(PART:"elm.thumb", "selected", 0.0); \
2305       } \
2306    } \
2307    program { name: "unselected_thumb"; \
2308       signal: "elm,state,unselected"; \
2309       source: "elm"; \
2310       script { \
2311          new st[31]; \
2312          new Float:vl; \
2313          get_state(PART:"elm.thumb", st, 30, vl); \
2314          if (!strcmp(st, "reorder_selected")) \
2315             set_state(PART:"elm.thumb", "reorder", 0.0); \
2316          else \
2317             set_state(PART:"elm.thumb", "default", 0.0); \
2318       } \
2319    }
2320
2321 //****************************************************************************//
2322 // *******************************  Icon Part ******************************//
2323 //***************************************************************************//
2324 #define GENLIST_PART_ICON(NAME, DESCRIPION) \
2325    part { name: NAME; \
2326       scale: 1; \
2327       type: SWALLOW; \
2328       DESCRIPION \
2329    }
2330
2331 #define GENLIST_PARAM_ICON_BIG \
2332          min: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE; \
2333          max: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE;
2334
2335 #define GENLIST_PARAM_ICON_SMALL \
2336          min: GENLIST_ICON_SMALL_SIZE GENLIST_ICON_SMALL_SIZE; \
2337          max: GENLIST_ICON_SMALL_SIZE GENLIST_ICON_SMALL_SIZE;
2338
2339 #define GENLIST_PARAM_ICON_BTN_01 \
2340          min: 0 GENLIST_BTN_01_HEIGHT; \
2341          max: -1 GENLIST_BTN_01_HEIGHT;
2342
2343 #define GENLIST_PARAM_ICON_BTN_02 \
2344          min: GENLIST_BTN_02_SIZE GENLIST_BTN_02_SIZE; \
2345          max: GENLIST_BTN_02_SIZE GENLIST_BTN_02_SIZE;
2346
2347 #define GENLIST_PARAM_ICON_ONOFF_WIDTH \
2348          min: GENLIST_ICON_ONOFF_WIDTH GENLIST_ICON_ONOFF_HEIGHT; \
2349          max: GENLIST_ICON_ONOFF_WIDTH GENLIST_ICON_ONOFF_HEIGHT;
2350
2351 #define GENLIST_PARAM_ICON_THUMBNAIL1\
2352          min: GENLIST_ICON_LARGE_SIZE GENLIST_ICON_LARGE_SIZE; \
2353          max: GENLIST_ICON_LARGE_SIZE GENLIST_ICON_LARGE_SIZE;
2354
2355 #define GENLIST_PARAM_ICON_CHECK_RADIO \
2356          min: GENLIST_ICON_CHECK_RADIO_SIZE GENLIST_ICON_CHECK_RADIO_SIZE; \
2357          max: GENLIST_ICON_CHECK_RADIO_SIZE GENLIST_ICON_CHECK_RADIO_SIZE;
2358
2359 #define GENLIST_PARAM_ICON_STAR \
2360          min: GENLIST_ICON_STAR_SIZE GENLIST_ICON_STAR_SIZE; \
2361          max: GENLIST_ICON_STAR_SIZE GENLIST_ICON_STAR_SIZE; \
2362
2363 #define GENLIST_PART_ICON_BIG_R(NAME, RIGHT) \
2364    GENLIST_PART_ICON(NAME, \
2365       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2366          fixed: 1 1; \
2367          GENLIST_PARAM_ICON_BIG \
2368       ) \
2369    )
2370
2371 #define GENLIST_PART_ICON_BIG_L(NAME, LEFT) \
2372    GENLIST_PART_ICON(NAME, \
2373       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2374          GENLIST_PARAM_ICON_BIG \
2375          fixed: 1 1; \
2376       ) \
2377    )
2378
2379 #define GENLIST_PART_ICON_SMALL_L(NAME, LEFT) \
2380    GENLIST_PART_ICON(NAME, \
2381       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2382          GENLIST_PARAM_ICON_SMALL \
2383          fixed: 1 1; \
2384       ) \
2385    )
2386
2387 #define GENLIST_PART_ICON_SMALL_LB(NAME, LEFT, BOTTOM) \
2388    GENLIST_PART_ICON(NAME, \
2389       GENLIST_DESCRIPTION_LB(LEFT, BOTTOM, \
2390         GENLIST_PARAM_ICON_SMALL \
2391         fixed: 1 1; \
2392       ) \
2393    )
2394
2395 #define GENLIST_PART_ICON_SMALL_LTB(NAME, LEFT, TOP, BOTTOM) \
2396    GENLIST_PART_ICON(NAME, \
2397       GENLIST_DESCRIPTION_LTB(LEFT, TOP, BOTTOM, \
2398          GENLIST_PARAM_ICON_SMALL \
2399          fixed: 1 1; \
2400       ) \
2401    )
2402
2403 #define GENLIST_PART_ICON_SMALL_RTB(NAME, RIGHT, TOP, BOTTOM) \
2404    GENLIST_PART_ICON(NAME, \
2405       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
2406          GENLIST_PARAM_ICON_SMALL \
2407          fixed: 1 1; \
2408       ) \
2409    )
2410
2411 #define GENLIST_PART_ICON_BTN_01_RTB(NAME, RIGHT, TOP, BOTTOM) \
2412    GENLIST_PART_ICON(NAME, \
2413       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM,\
2414          GENLIST_PARAM_ICON_BTN_01 \
2415          fixed: 1 1; \
2416       ) \
2417    )
2418
2419 #define GENLIST_PART_ICON_BTN_02_RTB(NAME, RIGHT, TOP, BOTTOM) \
2420    GENLIST_PART_ICON(NAME, \
2421       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM,\
2422          GENLIST_PARAM_ICON_BTN_02 \
2423          fixed: 1 1; \
2424       ) \
2425    )
2426
2427 #define GENLIST_PART_ICON_BTN_ONOFF_R(NAME, RIGHT) \
2428    GENLIST_PART_ICON(NAME, \
2429       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2430          GENLIST_PARAM_ICON_ONOFF_WIDTH \
2431          fixed: 1 1; \
2432       ) \
2433    )
2434
2435 #define GENLIST_PART_ICON_BTN_ONOFF_L(NAME, LEFT) \
2436    GENLIST_PART_ICON(NAME, \
2437       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2438          GENLIST_PARAM_ICON_ONOFF_WIDTH \
2439          fixed: 1 1; \
2440       ) \
2441    )
2442
2443 #define GENLIST_PART_ICON_THUMBNAIL1_R(NAME, RIGHT) \
2444    GENLIST_PART_ICON(NAME, \
2445       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2446          GENLIST_PARAM_ICON_THUMBNAIL1 \
2447          fixed: 1 1; \
2448       ) \
2449    )
2450
2451 #define GENLIST_PART_ICON_CHECK_RADIO_L(NAME, LEFT) \
2452    GENLIST_PART_ICON(NAME, \
2453       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2454          GENLIST_PARAM_ICON_CHECK_RADIO \
2455          fixed: 1 1; \
2456       ) \
2457    )
2458
2459 #define GENLIST_PART_ICON_STAR_RTB(NAME, RIGHT, TOP, BOTTOM) \
2460    GENLIST_PART_ICON(NAME, \
2461       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
2462          GENLIST_PARAM_ICON_STAR \
2463          fixed: 1 1; \
2464       ) \
2465    )
2466
2467 /*****************************************************************************/
2468 /******************************* Genlist IMAGE ********************************/
2469 /*****************************************************************************/
2470 #define GENLIST_PART_IMAGE(NAME, DESCRIPION) \
2471    part { name: NAME; \
2472       scale: 1; \
2473       type: IMAGE; \
2474       DESCRIPION \
2475    }
2476
2477 #define GENLIST_PARAM_PASSWORD_IMAGE \
2478             min: GENLIST_ICON_PASSWORD_SIZE GENLIST_ICON_PASSWORD_SIZE; \
2479             max: GENLIST_ICON_PASSWORD_SIZE GENLIST_ICON_PASSWORD_SIZE; \
2480             image.normal: "00_search_edit_field_bg_02.png"; \
2481             image.border: 12 13 12 13; \
2482             image.border_scale: 1;
2483
2484 /*****************************************************************************/
2485 /******************************* Genlist Bubble ********************************/
2486 /*****************************************************************************/
2487 #define GENLIST_IMAGES_EXPANDABLE_BTN \
2488          images { \
2489             image: "00_button_expand_closed.png" COMP; \
2490             image: "00_button_expand_opened.png" COMP; \
2491          }
2492
2493 #define GENLIST_PART_EXPANDABLE_ARROW \
2494          GENLIST_PART_ICON("touch_arrow", \
2495             ignore_flags: ON_HOLD; \
2496             GENLIST_DESCRIPTION_ENVELOP("arrow", ) \
2497          ) \
2498          GENLIST_PART_RECT("arrow_clip", \
2499             GENLIST_DESCRIPTION_ENVELOP("arrow", \
2500                color: 101 101 101 255; \
2501             ) \
2502             description { state: "disabled" 0.0; \
2503                color: 101 101 101 76; \
2504             } \
2505             description { state: "expand_opened_press" 0.0; \
2506                color: 248 246 239 255; \
2507             } \
2508             description { state: "default_press" 0.0; \
2509                color: 248 246 239 255; \
2510             } \
2511          ) \
2512          GENLIST_PART_IMAGE("arrow", \
2513             clip_to: "arrow_clip"; \
2514             ignore_flags: ON_HOLD; \
2515             mouse_events: 0; \
2516             GENLIST_DESCRIPTION_R("elm.padding.right", \
2517                fixed: 1 1; \
2518                min: 45 45; \
2519                max: 45 45; \
2520                image.normal: "00_button_expand_closed.png"; \
2521             ) \
2522             description { state: "default_press" 0.0; \
2523                inherit: "default" 0.0; \
2524                image.normal: "00_button_expand_closed_press.png"; \
2525             } \
2526             description { state: "expand_opened" 0.0; \
2527                inherit: "default" 0.0; \
2528                image.normal: "00_button_expand_opened.png"; \
2529             } \
2530             description { state: "expand_opened_press" 0.0; \
2531                inherit: "expand_opened" 0.0; \
2532                image.normal: "00_button_expand_opened_press.png"; \
2533             } \
2534          )
2535 /*****************************************************************************/
2536 /******************************* Genlist RECT ********************************/
2537 /*****************************************************************************/
2538 #define GENLIST_PART_SPACER(NAME, DESCRIPION) \
2539     part { name: NAME; \
2540       scale: 1; \
2541       mouse_events: 0; \
2542       type: SPACER; \
2543       DESCRIPION \
2544    }
2545
2546 #define GENLIST_PART_RECT(NAME, DESCRIPION) \
2547     part { name: NAME; \
2548       scale: 1; \
2549       type: RECT; \
2550       DESCRIPION \
2551    }
2552
2553 /*****************************************************************************/
2554 /******************************* Genlist TEXT ********************************/
2555 /*****************************************************************************/
2556 // FIXME: because, when naviframe item is pushed,
2557 // naviframe freeze all events so text events cannot be repeated. :-(
2558 // So all texts should have it's own sound program, not repeat to BG
2559 #define GENLIST_PART_TEXT(NAME, DESCRIPION) \
2560     part { name: NAME; \
2561       scale: 1; \
2562       type: TEXT; \
2563       DESCRIPION \
2564    }
2565
2566 #define GENLIST_PART_TEXTBLOCK(NAME, DESCRIPION) \
2567     part { name: NAME; \
2568       scale: 1; \
2569       type: TEXTBLOCK; \
2570       DESCRIPION \
2571    }
2572
2573 /*************************** parameters **********************************/
2574 #define GENLIST_PARAM_TEXT_LIMIT_RB \
2575    rel1.to_x: "base"; /* This limits text growing. */\
2576    rel1.relative: 0.35 0; /* This limits text growing. */\
2577    text.max: 1 0; /* This limits text growing. */
2578
2579 #define GENLIST_PARAM_TEXT_LIMIT_RT \
2580    rel1.to_x: "base"; /* This limits text growing. */\
2581    rel1.relative: 0.35 1; /* This limits text growing. */\
2582    text.max: 1 0; /* This limits text growing. */
2583
2584 #define GENLIST_PARAM_TEXT_LIMIT_RTB \
2585    rel1.to_x: "base"; /* This limits text growing. */\
2586    rel1.relative: 0.35 1; /* This limits text growing. */\
2587    text.max: 1 0; /* This limits text growing. */
2588
2589 // Group Title
2590 #define GENLIST_PARAM_DIALOGUE_GROUP_TITLE \
2591    color: GENLIST_DIALOGUE_GROUP_TITLE_COLOR; \
2592    text { \
2593       align: 0.0 0.5; \
2594       font: "Tizen:style=Bold"; \
2595       min: 0 1; \
2596       size: GENLIST_DIALOGUE_GROUP_TITLE_SIZE; \
2597       text_class: "list_item"; \
2598    }
2599
2600 // Password style
2601 #define GENLIST_PARAM_PASSWORD_TITLE \
2602    color: DIALOGUE_PASSWORD_TITLE_COLOR; \
2603    text { \
2604       font: "Tizen:style=Bold"; \
2605       size: DIALOGUE_PASSWORD_TITLE_SIZE; \
2606       min: 0 1; \
2607       align: 0 0.5; \
2608       text_class: "list_item"; \
2609    }
2610
2611 // Progress main text
2612 #define GENLIST_PARAM_PROGRESS_MAIN \
2613    color: GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR; \
2614    text { \
2615       align: 0 0.5; \
2616       min: 0 1; \
2617       font: "Tizen:style=Regular"; \
2618       size: GENLIST_PROGRESS_MAIN_TEXT_SIZE; \
2619       text_class: "list_item"; \
2620    }
2621
2622 // list main text
2623 #define GENLIST_PARAM_LISTITEM \
2624    color: GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR; \
2625    text { \
2626       align: 0 0.5; \
2627       min: 0 1; \
2628       font: "Tizen:style=Regular"; \
2629       size: GENLIST_LIST_MAIN_TEXT_SIZE; \
2630       text_class: "list_item"; \
2631    }
2632
2633 #define GENLIST_PARAM_LISTITEM_TB \
2634    text { \
2635       min: 0 1; \
2636       style: "genlist_style_list_main_text_unread"; \
2637    }
2638
2639 #define GENLIST_PARAM_LISTITEM_TB_WRAP \
2640    text { \
2641       min: 0 1; \
2642       style: "genlist_style_list_main_text_unread_wrap"; \
2643    }
2644
2645 // list subtext
2646 #define GENLIST_PARAM_SUBITEM_DEFAULT \
2647    color: GENLIST_LIST_SUB_TEXT_DEFAULT_COLOR; \
2648    text { \
2649       align: 0 0.5; \
2650       min: 0 1; \
2651       font: "Tizen:style=Bold"; \
2652       size: GENLIST_LIST_SUB_TEXT_SIZE; \
2653       text_class: "tizen"; \
2654    }
2655
2656 #define GENLIST_PARAM_SUBITEM_SETTINGS \
2657    color: GENLIST_LIST_SUB_TEXT_SETTINGS_COLOR; \
2658    text { \
2659       align: 0 0.5; \
2660       min: 0 1; \
2661       font: "Tizen:style=Bold"; \
2662       size: GENLIST_LIST_SUB_TEXT_SIZE; \
2663       text_class: "tizen"; \
2664    }
2665
2666 #define GENLIST_PARAM_SUBITEM_DEFAULT_TB \
2667    text { \
2668       min: 0 1; \
2669       style: "genlist_style_list_sub_text_default"; \
2670    }
2671
2672 #define GENLIST_PARAM_SUBITEM_DEFAULT_TB_WRAP \
2673    text { \
2674       min: 0 1; \
2675       style: "genlist_style_list_sub_text_default_wrap"; \
2676    }
2677
2678 #define GENLIST_PARAM_SUBITEM_SETTINGS_TB \
2679    text { \
2680       min: 0 1; \
2681       style: "genlist_style_list_sub_text_settings"; \
2682    }
2683
2684 // list subtext 02
2685 #define GENLIST_PARAM_SUBITEM_02 \
2686    color: GENLIST_LIST_SUB_TEXT_02_COLOR; \
2687    text { \
2688       align: 0 0.5; \
2689       min: 0 1; \
2690       font: "Tizen:style=Bold"; \
2691       size: GENLIST_LIST_SUB_TEXT_02_SIZE; \
2692       text_class: "tizen"; \
2693    }
2694
2695 // Dialogue group - Apps
2696 #define GENLIST_PARAM_APPS_NAME\
2697    color: GENLIST_APPS_NAME_COLOR; \
2698    text { \
2699       align: 0 0.5; \
2700       min: 0 1; \
2701       font: "Tizen:style=Bold"; \
2702       size: GENLIST_APPS_NAME_SIZE; \
2703       text_class: "list_item"; \
2704    }
2705
2706 #define GENLIST_PARAM_APPS_INC\
2707    color: GENLIST_APPS_INC_COLOR; \
2708    text { \
2709       align: 0 0.5; \
2710       min: 0 1; \
2711       font: "Tizen:style=Bold"; \
2712       size: GENLIST_APPS_INC_SIZE; \
2713       text_class: "list_item"; \
2714    }
2715
2716 #define GENLIST_PARAM_APPS_RATING\
2717    color: GENLIST_APPS_RATING_COLOR; \
2718    text { \
2719       align: 0 0.5; \
2720       min: 0 1; \
2721       font: "Tizen:style=Bold"; \
2722       size: GENLIST_APPS_RATING_SIZE; \
2723       text_class: "list_item"; \
2724    }
2725
2726 #define GENLIST_PARAM_APPS_PRICE\
2727    color: GENLIST_APPS_PRICE_ORIGINAL_COLOR; \
2728    text { \
2729       align: 0 0.5; \
2730       min: 0 1; \
2731       font: "Tizen:style=Bold"; \
2732       size: GENLIST_APPS_PRICE_SIZE; \
2733       text_class: "list_item"; \
2734    }
2735
2736 #define GENLIST_PARAM_APPS_PRICE_SALE\
2737    color: GENLIST_APPS_PRICE_SALE_COLOR; \
2738    text { \
2739       align: 0 0.5; \
2740       min: 0 1; \
2741       font: "Tizen:style=Bold"; \
2742       size: GENLIST_APPS_PRICE_SIZE; \
2743       text_class: "list_item"; \
2744    }
2745
2746 #define GENLIST_PARAM_CONTENTS_TEXT \
2747    color: GENLIST_CONTENTS_TEXT_COLOR; \
2748    text { \
2749       align: 0 0.5; \
2750       min: 0 1; \
2751       font: "Tizen:style=Regular"; \
2752       size: GENLIST_CONTENTS_TEXT_SIZE; \
2753       text_class: "tizen"; \
2754    }
2755
2756 /*************************** Descriptions **********************************/
2757 // list main text
2758 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2759    description { state: "disabled" 0.0; \
2760       inherit: "default" 0.0; \
2761       color: GENLIST_LIST_MAIN_TEXT_UNREAD_DIM_COLOR; \
2762    } \
2763    description { state: "read" 0.0; \
2764       inherit: "default" 0.0; \
2765       color: GENLIST_LIST_MAIN_TEXT_READ_COLOR; \
2766    } \
2767    description { state: "read,disabled" 0.0; \
2768       inherit: "default" 0.0; \
2769       color: GENLIST_LIST_MAIN_TEXT_READ_DIM_COLOR; \
2770    } \
2771    description { state: "selected" 0.0; \
2772       inherit: "default" 0.0; \
2773       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2774    }
2775
2776 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2777    description { state: "disabled" 0.0; \
2778       inherit: "default" 0.0; \
2779       text.style: "genlist_style_list_main_text_unread_dim"; \
2780    } \
2781    description { state: "read" 0.0; \
2782       inherit: "default" 0.0; \
2783       text.style: "genlist_style_list_main_text_read"; \
2784    } \
2785    description { state: "read,disabled" 0.0; \
2786       inherit: "default" 0.0; \
2787       text.style: "genlist_style_list_main_text_read_dim"; \
2788    } \
2789    description { state: "selected" 0.0; \
2790       inherit: "default" 0.0; \
2791       text.style: "genlist_style_list_main_text_focus"; \
2792    }
2793
2794 // list sub text
2795 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2796    description { state: "disabled" 0.0; \
2797       inherit: "default" 0.0; \
2798       color: GENLIST_LIST_SUB_TEXT_DEFAULT_DIM_COLOR; \
2799    } \
2800    description { state: "selected" 0.0; \
2801       inherit: "default" 0.0; \
2802       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2803    }
2804
2805 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
2806    description { state: "disabled" 0.0; \
2807       inherit: "default" 0.0; \
2808       text.style: "genlist_style_list_sub_text_default_dim"; \
2809    } \
2810    description { state: "selected" 0.0; \
2811       inherit: "default" 0.0; \
2812       text.style: "genlist_style_list_sub_text_focus"; \
2813    }
2814
2815 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB_WRAP \
2816    description { state: "disabled" 0.0; \
2817       inherit: "default" 0.0; \
2818       text.style: "genlist_style_list_sub_text_default_dim_wrap"; \
2819    } \
2820    description { state: "selected" 0.0; \
2821       inherit: "default" 0.0; \
2822       text.style: "genlist_style_list_sub_text_focus_wrap"; \
2823    }
2824
2825 #define GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
2826    description { state: "disabled" 0.0; \
2827       inherit: "default" 0.0; \
2828       color: GENLIST_LIST_SUB_TEXT_SETTINGS_DIM_COLOR; \
2829    } \
2830    description { state: "selected" 0.0; \
2831       inherit: "default" 0.0; \
2832       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2833    }
2834
2835 #define GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS_TB \
2836    description { state: "disabled" 0.0; \
2837       inherit: "default" 0.0; \
2838       text.style: "genlist_style_list_sub_text_settings_dim"; \
2839    } \
2840    description { state: "selected" 0.0; \
2841       inherit: "default" 0.0; \
2842       text.style: "genlist_style_list_sub_text_focus"; \
2843    }
2844
2845 // list main text multiline
2846 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB_WRAP \
2847    description { state: "disabled" 0.0; \
2848       inherit: "default" 0.0; \
2849       text.style: "genlist_style_list_main_text_unread_dim_wrap"; \
2850    } \
2851    description { state: "selected" 0.0; \
2852       inherit: "default" 0.0; \
2853       text.style: "genlist_style_list_main_text_focus_wrap"; \
2854    }
2855
2856 /*************************** Parts **********************************/
2857 #define GENLIST_PART_DIALOGUE_GROUP_HELP_TEXT(NAME, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2858    GENLIST_PART_TEXTBLOCK(NAME, \
2859       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2860          text { \
2861             min: 0 1; \
2862             style: "genlist_style_dialogue_group_help_text"; \
2863          } \
2864          PARAM) \
2865    )
2866
2867 #define GENLIST_PART_LISTITEM(NAME, DESCRIPTION) \
2868    GENLIST_PART_TEXT(NAME, \
2869       DESCRIPTION \
2870       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2871    )
2872
2873 #define GENLIST_PART_LISTITEM_TB(NAME, DESCRIPTION) \
2874    GENLIST_PART_TEXTBLOCK(NAME, \
2875       DESCRIPTION \
2876       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2877    )
2878
2879 #define GENLIST_PART_LISTITEM_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2880    GENLIST_PART_TEXT(NAME, \
2881       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2882          min: 0 HEIGHT; \
2883          GENLIST_PARAM_LISTITEM \
2884          PARAM \
2885       ) \
2886       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2887    )
2888
2889 #define GENLIST_PART_LISTITEM_TB_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2890    GENLIST_PART_TEXTBLOCK(NAME, \
2891       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2892          min: 0 HEIGHT; \
2893          fixed: 1 0; \
2894          GENLIST_PARAM_LISTITEM_TB \
2895          PARAM \
2896       ) \
2897       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2898    )
2899
2900 #define GENLIST_PART_LISTITEM_LR(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
2901    GENLIST_PART_TEXT(NAME, \
2902       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
2903          min: 0 HEIGHT; \
2904          GENLIST_PARAM_LISTITEM \
2905          PARAM \
2906       ) \
2907       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2908    )
2909
2910 #define GENLIST_PART_LISTITEM_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP, PARAM) \
2911    GENLIST_PART_TEXT(NAME, \
2912       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
2913          min: 0 HEIGHT; \
2914          fixed: 0 1; \
2915          GENLIST_PARAM_LISTITEM \
2916          PARAM \
2917       ) \
2918       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2919    )
2920
2921 #define GENLIST_PART_LISTITEM_LRT_TB(NAME, HEIGHT, LEFT, RIGHT, TOP, PARAM) \
2922    GENLIST_PART_TEXTBLOCK(NAME, \
2923       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
2924          min: 0 HEIGHT; \
2925          fixed: 0 1; \
2926          GENLIST_PARAM_LISTITEM_TB \
2927          PARAM \
2928       ) \
2929       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2930    )
2931
2932 #define GENLIST_PART_LISTITEM_LR_TB(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
2933    GENLIST_PART_TEXTBLOCK(NAME, \
2934       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
2935          min: 0 HEIGHT; \
2936          fixed: 1 0; \
2937          GENLIST_PARAM_LISTITEM_TB \
2938          PARAM \
2939       ) \
2940       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2941    )
2942
2943 #define GENLIST_PART_SUBITEM_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2944    GENLIST_PART_TEXT(NAME, \
2945       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2946          min: 0 HEIGHT; \
2947          GENLIST_PARAM_SUBITEM_DEFAULT \
2948          PARAM \
2949       ) \
2950       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2951    )
2952
2953 #define GENLIST_PART_SUBITEM(NAME, DESCRIPTION) \
2954    GENLIST_PART_TEXT(NAME, \
2955       DESCRIPTION \
2956       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2957    )
2958
2959 #define GENLIST_PART_SUBITEM_R(NAME, HEIGHT, RIGHT) \
2960    GENLIST_PART_TEXT(NAME, \
2961       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2962          min: 0 HEIGHT; \
2963          fixed: 1 0; \
2964          GENLIST_PARAM_TEXT_LIMIT_RB \
2965          GENLIST_PARAM_SUBITEM_DEFAULT \
2966       ) \
2967       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2968    )
2969
2970 #define GENLIST_PART_SUBITEM_RB(NAME, HEIGHT, RIGHT, BOTTOM) \
2971    GENLIST_PART_TEXT(NAME, \
2972       GENLIST_DESCRIPTION_RB(RIGHT, BOTTOM, \
2973          min: 0 HEIGHT; \
2974          fixed: 1 1; \
2975          GENLIST_PARAM_TEXT_LIMIT_RB \
2976          GENLIST_PARAM_SUBITEM_DEFAULT \
2977       ) \
2978       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2979    )
2980
2981 #define GENLIST_PART_SUBITEM_RB_TB(NAME, HEIGHT, RIGHT, BOTTOM) \
2982    GENLIST_PART_TEXTBLOCK(NAME, \
2983       GENLIST_DESCRIPTION_RB(RIGHT, BOTTOM, \
2984          min: 0 HEIGHT; \
2985          GENLIST_PARAM_TEXT_LIMIT_RB \
2986          fixed: 1 1; \
2987          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
2988       ) \
2989       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
2990    )
2991
2992 #define GENLIST_PART_SUBITEM_TB_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM) \
2993    GENLIST_PART_TEXTBLOCK(NAME, \
2994       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2995          min: 0 HEIGHT; \
2996          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
2997       ) \
2998       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
2999    )
3000
3001 #define GENLIST_PART_SUBITEM_R_FIXED(NAME, WIDTH, HEIGHT, RIGHT) \
3002    GENLIST_PART_TEXT(NAME, \
3003       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
3004          min: WIDTH HEIGHT; \
3005          fixed: 1 1; \
3006          GENLIST_PARAM_SUBITEM_DEFAULT \
3007       ) \
3008       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3009    )
3010
3011 #define GENLIST_PART_SUBITEM_R_FIXED_TB(NAME, WIDTH, HEIGHT, RIGHT) \
3012    GENLIST_PART_TEXTBLOCK(NAME, \
3013        GENLIST_DESCRIPTION_R(RIGHT, \
3014          min: WIDTH HEIGHT; \
3015          fixed: 1 0; \
3016          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3017       ) \
3018       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3019    )
3020
3021 #define GENLIST_PART_SUBITEM_L_FIXED(NAME, WIDTH, HEIGHT, LEFT) \
3022    GENLIST_PART_TEXT(NAME, \
3023       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
3024          min: WIDTH HEIGHT; \
3025          fixed: 1 1; \
3026          GENLIST_PARAM_SUBITEM_DEFAULT \
3027       ) \
3028       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3029    )
3030
3031 #define GENLIST_PART_SUBITEM_LR(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
3032    GENLIST_PART_TEXT(NAME, \
3033       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
3034          min: 0 HEIGHT; \
3035          GENLIST_PARAM_SUBITEM_DEFAULT \
3036          PARAM \
3037       ) \
3038       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3039    )
3040
3041 #define GENLIST_PART_SUBITEM_LR_TB(NAME, HEIGHT, LEFT, RIGHT) \
3042    GENLIST_PART_TEXTBLOCK(NAME, \
3043       GENLIST_DESCRIPTION_LR(LEFT, RIGHT, \
3044          min: 0 HEIGHT; \
3045          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3046       ) \
3047       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3048    )
3049
3050 #define GENLIST_PART_SUBITEM_LB(NAME, HEIGHT, LEFT, RIGHT) \
3051    GENLIST_PART_TEXT(NAME, \
3052       GENLIST_DESCRIPTION_LB(LEFT, BOTTOM, \
3053          min: 0 HEIGHT; \
3054          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3055       ) \
3056       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3057    )
3058
3059 #define GENLIST_PART_SUBITEM_LRB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3060    GENLIST_PART_TEXT(NAME, \
3061       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3062          min: 0 HEIGHT; \
3063          GENLIST_PARAM_SUBITEM_DEFAULT \
3064          fixed: 0 1; \
3065       ) \
3066       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3067    )
3068
3069 #define GENLIST_PART_SUBITEM_SETTINGS_LRB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM, PARAM) \
3070    GENLIST_PART_TEXT(NAME, \
3071       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3072          min: 0 HEIGHT; \
3073          fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
3074          GENLIST_PARAM_SUBITEM_SETTINGS\
3075          PARAM; \
3076       ) \
3077       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
3078    )
3079
3080 #define GENLIST_PART_SUBITEM_LRB_TB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3081    GENLIST_PART_TEXTBLOCK(NAME, \
3082       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3083          min: 0 HEIGHT; \
3084          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3085          fixed: 0 1; \
3086       ) \
3087       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3088    )
3089
3090 #define GENLIST_PART_SUBITEM_SETTINGS_LRB_TB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3091    GENLIST_PART_TEXTBLOCK(NAME, \
3092       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3093          min: 0 HEIGHT; \
3094          GENLIST_PARAM_SUBITEM_SETTINGS_TB \
3095          fixed: 0 1; \
3096       ) \
3097       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS_TB \
3098    )
3099
3100 #define GENLIST_PART_SUBITEM_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP) \
3101    GENLIST_PART_TEXT(NAME, \
3102       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
3103          min: 0 HEIGHT; \
3104          fixed: 0 1; \
3105          GENLIST_PARAM_SUBITEM_DEFAULT \
3106       ) \
3107       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3108    )
3109
3110 #define GENLIST_PART_SUBITEM_SETTINGS_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP) \
3111    GENLIST_PART_TEXT(NAME, \
3112       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
3113          min: 0 HEIGHT; \
3114          fixed: 0 1; \
3115          GENLIST_PARAM_SUBITEM_SETTINGS \
3116       ) \
3117       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
3118    )
3119
3120 #define GENLIST_PART_SUBITEM_LTB(NAME, HEIGHT, LEFT, TOP, BOTTOM) \
3121    GENLIST_PART_TEXT(NAME, \
3122       GENLIST_DESCRIPTION_LTB(LEFT, TOP, BOTTOM, \
3123          min: 0 HEIGHT; \
3124          fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
3125          GENLIST_PARAM_SUBITEM_DEFAULT \
3126       ) \
3127       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3128    )
3129
3130 #define GENLIST_PART_SUBITEM_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3131    GENLIST_PART_TEXT(NAME, \
3132       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3133          min: 0 HEIGHT; \
3134          GENLIST_PARAM_TEXT_LIMIT_RT \
3135          GENLIST_PARAM_SUBITEM_DEFAULT \
3136          fixed: 1 0; \
3137       ) \
3138       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3139    )
3140
3141 #define GENLIST_PART_SUBITEM_RTB_TB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3142    GENLIST_PART_TEXTBLOCK(NAME, \
3143       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3144          min: 0 HEIGHT; \
3145          GENLIST_PARAM_TEXT_LIMIT_RT \
3146          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3147          fixed: 1 0; \
3148       ) \
3149       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3150    )
3151
3152 #define GENLIST_PART_SUBITEM_02_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3153    GENLIST_PART_TEXT(NAME, \
3154       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3155          min: 0 HEIGHT; \
3156          GENLIST_PARAM_TEXT_LIMIT_RT \
3157          GENLIST_PARAM_SUBITEM_02 \
3158          fixed: 1 0; \
3159       ) \
3160       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3161    )
3162
3163 #define GENLIST_PARAM_LIST_BUBBLE_TEXT \
3164    color: GENLIST_LIST_BUBBLE_TEXT_COLOR; \
3165    text { \
3166       align: 1 0.5; \
3167       min: 0 1; \
3168       font: "Tizen:style=Bold"; \
3169       size: GENLIST_LIST_BUBBLE_TEXT_SIZE; \
3170       text_class: "tizen"; \
3171    }
3172
3173 // FIXME: Need to find why rel2.offset: 9 -1 will not fix the alignment of bubble text ?
3174 #define GENLIST_PART_LIST_BUBBLE_TEXT_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3175          GENLIST_PART_IMAGE("elm.bubble", \
3176             mouse_events: 0; \
3177             GENLIST_DESCRIPTION_ENVELOP(NAME, \
3178                image { \
3179                   normal: "00_list_bubble_bg.png"; \
3180                   border: 8 8 0 0; \
3181                } \
3182                rel1.offset: -10 0; \
3183                rel2.offset: 8 -1; \
3184                min: 48 38; \
3185                max: -1 38; \
3186                fixed: 0 1; \
3187                color: GENLIST_LIST_BUBBLE_COLOR; \
3188             ) \
3189             description { state: "selected" 0.0; \
3190                inherit: "default" 0.0; \
3191                color: GENLIST_LIST_BUBBLE_PRESS_COLOR; \
3192             } \
3193          ) \
3194          GENLIST_PART_TEXT(NAME, \
3195             GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3196                min: 0 HEIGHT; \
3197                GENLIST_PARAM_TEXT_LIMIT_RT \
3198                rel2.offset: -10 -1; /* This maintain the text alignment with bubble text. */\
3199                GENLIST_PARAM_LIST_BUBBLE_TEXT \
3200             ) \
3201             description { state: "selected" 0.0; \
3202                inherit: "default" 0.0; \
3203                color: GENLIST_LIST_BUBBLE_TEXT_FOCUS_COLOR; \
3204             } \
3205          )
3206
3207 #if 0
3208 #define GENLIST_PART_BASE__( param_item_height ) \
3209          part { name: "base"; \
3210             type: RECT; \
3211             repeat_events: 1; \
3212             scale: 1; \
3213             description { state: "default" 0.0; \
3214                min: 0 param_item_height; \
3215                color: LAYOUT_GROUP_LIST_BG_COLOR_INC; \
3216             } \
3217          }
3218
3219 /******************************************************************************/
3220 /** ETC
3221 /******************************************************************************/
3222 // FIXME: UX do not define selected state. But I thinkt that it is neededs :(
3223
3224 #define GENLIST_PROOGRAM_EXPAND(SRC, TARGET) \
3225    program { \
3226       name: "expand"; \
3227       signal: "mouse,clicked,1"; \
3228       source: SRC; \
3229       action: SIGNAL_EMIT "elm,action,expand,toggle" "elm"; \
3230    } \
3231    program { \
3232       name: "go_expanded"; \
3233       signal: "elm,state,expanded"; \
3234       source: "elm"; \
3235       action: STATE_SET "active" 0.0; \
3236       TARGET \
3237    } \
3238    program { \
3239       name: "go_contracted"; \
3240       signal: "elm,state,contracted"; \
3241       source: "elm"; \
3242       action: STATE_SET "default" 0.0; \
3243       TARGET \
3244    }
3245
3246 #define GENLIST_PART_BASE_LIST_H( HEIGHT) \
3247          part { name: "base"; \
3248             type: RECT; \
3249             repeat_events: 1; \
3250             scale: 1; \
3251             description { state: "default" 0.0; \
3252                align: 0.5 0.5; \
3253                color: 0 0 0 0; \
3254                rel2.relative: 1 0; \
3255                rel2.to: "bottom_line"; \
3256                min: 0 HEIGHT; \
3257             } \
3258          } \
3259          GENLIST_PART_BOTTOM_LINE
3260
3261 #define GENLIST_PART_DIALOGUE_ITEM \
3262          part { name: "elm.rect.dialogue"; \
3263             type: RECT; \
3264             scale: 1; \
3265             description { state: "default" 0.0; \
3266                min: 10 0; \
3267                fixed: 1 0; \
3268                color: GENLIST_DIALOGUE_GROUP_LEFT_BG_COLOR_INC; \
3269                rel2.relative: 0.0 1.0; \
3270                align: 0.0 0.0; \
3271             } \
3272          }
3273
3274 #define GENLIST_PART_DIALOGUE_RIGHT_LINE \
3275          part { name: "elm.rect.dialogue.right.line"; \
3276             type: RECT; \
3277             scale: 1; \
3278             description { state: "default" 0.0; \
3279                min: 1 0; \
3280                fixed: 1 0; \
3281                rel1 { \
3282                   relative: 1.0  0.0; \
3283                   offset: -1 0; \
3284                } \
3285                align: 1.0 0.0; \
3286                color: GENLIST_LIST_LINE1_COLOR; \
3287             } \
3288          }
3289
3290 #define GENLIST_PROGRAM_FLIP_1TEXT \
3291          program { name: "flipped"; \
3292             signal: "elm,state,flip,enabled"; \
3293             source: "elm"; \
3294             action: STATE_SET "flipped" 0.0; \
3295             target: "elm.text"; \
3296             target: "elm.flip.content"; \
3297          } \
3298          program { name: "flip_disabled"; \
3299             signal: "elm,state,flip,disabled"; \
3300             source: "elm"; \
3301             action: STATE_SET "default" 0.0; \
3302             target: "elm.text"; \
3303             target: "elm.flip.content"; \
3304          }
3305
3306 #define GENLIST_PROGRAM_FLIP_2TEXT \
3307          program { name: "flipped"; \
3308             signal: "elm,state,flip,enabled"; \
3309             source: "elm"; \
3310             action: STATE_SET "flipped" 0.0; \
3311             target: "elm.text.1"; \
3312             target: "elm.text.2"; \
3313             target: "elm.flip.content"; \
3314          } \
3315          program { name: "flip_disabled"; \
3316             signal: "elm,state,flip,disabled"; \
3317             source: "elm"; \
3318             action: STATE_SET "default" 0.0; \
3319             target: "elm.text.1"; \
3320             target: "elm.text.2"; \
3321             target: "elm.flip.content"; \
3322          }
3323
3324 #define GENLIST_PROGRAM_FLIP_2TEXT_1ICON \
3325          program { name: "flipped"; \
3326             signal: "elm,state,flip,enabled"; \
3327             source: "elm"; \
3328             action: STATE_SET "flipped" 0.0; \
3329             target: "elm.text.1"; \
3330             target: "elm.text.2"; \
3331             target: "elm.icon"; \
3332             target: "elm.flip.content"; \
3333          } \
3334          program { name: "flip_disabled"; \
3335             signal: "elm,state,flip,disabled"; \
3336             source: "elm"; \
3337             action: STATE_SET "default" 0.0; \
3338             target: "elm.text.1"; \
3339             target: "elm.text.2"; \
3340             target: "elm.icon"; \
3341             target: "elm.flip.content"; \
3342          }
3343
3344 #define GENLIST_PROGRAM_FLIP_2TEXT_2ICON \
3345          program { name: "flipped"; \
3346             signal: "elm,state,flip,enabled"; \
3347             source: "elm"; \
3348             action: STATE_SET "flipped" 0.0; \
3349             target: "elm.text.1"; \
3350             target: "elm.text.2"; \
3351             target: "elm.icon.1"; \
3352             target: "elm.icon.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.icon.1"; \
3362             target: "elm.icon.2"; \
3363             target: "elm.flip.content"; \
3364          }
3365
3366 #define GENLIST_PROGRAM_FLIP_3TEXT_2ICON \
3367          program { name: "flipped"; \
3368             signal: "elm,state,flip,enabled"; \
3369             source: "elm"; \
3370             action: STATE_SET "flipped" 0.0; \
3371             target: "elm.text.1"; \
3372             target: "elm.text.2"; \
3373             target: "elm.text.3"; \
3374             target: "elm.icon.1"; \
3375             target: "elm.icon.2"; \
3376             target: "elm.flip.content"; \
3377          } \
3378          program { name: "flip_disabled"; \
3379             signal: "elm,state,flip,disabled"; \
3380             source: "elm"; \
3381             action: STATE_SET "default" 0.0; \
3382             target: "elm.text.1"; \
3383             target: "elm.text.2"; \
3384             target: "elm.text.3"; \
3385             target: "elm.icon.1"; \
3386             target: "elm.icon.2"; \
3387             target: "elm.flip.content"; \
3388          }
3389
3390
3391 #define GENLIST_DESCRIPTION_INVISIBLE_SELECTED \
3392             description { state: "selected" 1.0; \
3393                inherit: "default" 0.0; \
3394                visible: 0; \
3395             }
3396
3397 #define GENLIST_DESCRIPTION_FLIP_ENABLED \
3398             description { state: "flipped" 0.0; \
3399                inherit: "default" 0.0; \
3400                visible: 0; \
3401             }
3402
3403 #define GENLIST_PROGRAM_SCRIPT_FLIP_SELECT_1TEXT \
3404             script { \
3405                new st[31]; \
3406                new Float:vl; \
3407                get_state(PART:"elm.text", st, 30, vl); \
3408                set_state(PART:"bg", "selected", 0.0); \
3409                if (!strcmp(st, "flipped")) \
3410                   set_state(PART:"elm.text", "selected", 1.0); \
3411                else \
3412                   set_state(PART:"elm.text", "selected", 0.0); \
3413             }
3414
3415
3416 /* genlist multisense macro - start */
3417 #define GENLIST_PROGRAM_AFTER_PLAY_BUTTON_PRESS \
3418             after: "play_button_press";
3419
3420 #define GENLIST_PROGRAM_PLAY_BUTTON_PRESS \
3421          program { name: "play_button_press"; \
3422             action: PLAY_SAMPLE "button-pressed" 1.0; \
3423          }
3424 #endif