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