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