[Genlist] Fix entry dialouge bg programs
[profile/ivi/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
970 //****************************************************************************//
971 // ****************************** LINE ********************************//
972 //****************************************************************************//
973 #define GENLIST_PART_BOTTOM_LINE \
974          GENLIST_PART_RECT("bottom_line_clip", \
975             description { state: "default" 0.0; \
976                color: 255 255 255 255; \
977             } \
978             description { state: "decorate" 0.0; \
979                inherit: "default" 0.0; \
980                color: 0 0 0 0; \
981             } \
982             description { state: "reorder" 0.0; \
983                inherit: "default" 0.0; \
984                color: 0 0 0 0; \
985             } \
986             description { state: "decorate_reorder" 0.0; \
987                inherit: "default" 0.0; \
988                color: 0 0 0 0; \
989             } \
990          ) \
991          GENLIST_PART_RECT("bottom_line", \
992             mouse_events: 0; \
993             clip_to: "bottom_line_clip"; \
994             description { state: "default" 0.0; \
995                min: 0 GENLIST_PART_LIST_LINE_HEIGHT; \
996                max: -1 GENLIST_PART_LIST_LINE_HEIGHT; \
997                fixed: 0 1; \
998                align: 0.5 1; \
999                color: GENLIST_LIST_LINE1_COLOR; \
1000                rel1.to: "bottom_line2"; \
1001                rel2.to: "bottom_line2"; \
1002                rel2.relative: 1 0; \
1003                rel1.offset: -1 -1; \
1004             } \
1005             description { state: "selected" 0.0; \
1006                inherit: "default" 0.0; \
1007                color: GENLIST_LIST_PRESS_COLOR; \
1008             } \
1009             description { state: "disabled" 0.0; \
1010                inherit: "default" 0.0; \
1011                color: GENLIST_LIST_LINE1_COLOR; \
1012             } \
1013             description { state: "flipped" 0.0; \
1014                inherit: "default" 0.0; \
1015                visible: 0; \
1016             } \
1017          ) \
1018          GENLIST_PART_RECT("bottom_line2", \
1019             mouse_events: 0; \
1020             clip_to: "bottom_line_clip"; \
1021             description { state: "default" 0.0; \
1022                min: 0 GENLIST_PART_LIST_LINE_HEIGHT; \
1023                max: -1 GENLIST_PART_LIST_LINE_HEIGHT; \
1024                fixed: 0 1; \
1025                align: 0.5 1; \
1026                color: GENLIST_LIST_LINE2_COLOR; \
1027                rel1.to_x: "elm.padding.left"; \
1028                rel1.relative: 1 0; \
1029                rel2.to_x: "elm.padding.right"; \
1030                rel2.relative: 0 1; \
1031                rel1.offset: -1 -1; \
1032             } \
1033             description { state: "selected" 0.0; \
1034                inherit: "default" 0.0; \
1035                color: GENLIST_LIST_PRESS_COLOR; \
1036             } \
1037             description { state: "disabled" 0.0; \
1038                inherit: "default" 0.0; \
1039                color: GENLIST_LIST_LINE2_COLOR; \
1040             } \
1041             description { state: "flipped" 0.0; \
1042                inherit: "default" 0.0; \
1043                visible: 0; \
1044             } \
1045          )
1046
1047 #define GENLIST_PART_BOTTOM_LINE_OFF \
1048          GENLIST_PART_RECT("bottom_line", \
1049             mouse_events: 0; \
1050             description { state: "default" 0.0; \
1051                color: 0 0 0 0; \
1052             } \
1053             description { state: "selected" 0.0; \
1054                color: 0 0 0 0; \
1055             } \
1056             description { state: "disabled" 0.0; \
1057                color: 0 0 0 0; \
1058             } \
1059             description { state: "decorate" 0.0; \
1060                color: 0 0 0 0; \
1061             } \
1062          ) \
1063          GENLIST_PART_RECT("bottom_line2", \
1064             mouse_events: 0; \
1065             description { state: "default" 0.0; \
1066                color: 0 0 0 0; \
1067             } \
1068             description { state: "selected" 0.0; \
1069                color: 0 0 0 0; \
1070             } \
1071             description { state: "disabled" 0.0; \
1072                color: 0 0 0 0; \
1073             } \
1074             description { state: "decorate" 0.0; \
1075                color: 0 0 0 0; \
1076             } \
1077          )
1078
1079 #define GENLIST_PART_DIVIDER_PADDING \
1080          GENLIST_PART_SPACER("elm.padding.divider.top", \
1081             description { state: "default" 0.0; \
1082                align: 0.5 0; \
1083                min: 0 30; \
1084                max: -1 30; \
1085                fixed: 0 1; \
1086                rel2.relative: 1 0; \
1087             } \
1088          ) \
1089          GENLIST_PART_SPACER("elm.padding.divider.bottom", \
1090             description { state: "default" 0.0; \
1091                align: 0.5 1; \
1092                min: 0 30; \
1093                max: -1 30; \
1094                fixed: 0 1; \
1095                rel1.relative: 0 1; \
1096             } \
1097          ) \
1098
1099 #define GENLIST_PART_DIVIDER_L(LEFT) \
1100          GENLIST_PART_DIVIDER_PADDING \
1101          GENLIST_PART_RECT("elm.divider1", \
1102             mouse_events: 0; \
1103             GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.divider.top", "elm.padding.divider.bottom", \
1104                align: 0 0.5; \
1105                min: 1 0; \
1106                max: 1 -1; \
1107                fixed: 1 0; \
1108                rel2.offset: 0 0; \
1109                color: GENLIST_LIST_DIVIDER1_COLOR; \
1110             ) \
1111          ) \
1112          GENLIST_PART_RECT("elm.divider2", \
1113             mouse_events: 0; \
1114             GENLIST_DESCRIPTION_LTB("elm.divider1", "elm.padding.divider.top", "elm.padding.divider.bottom", \
1115                align: 0 0.5; \
1116                min: 1 0; \
1117                max: 1 -1; \
1118                fixed: 1 0; \
1119                rel2.offset: 0 0; \
1120                color: GENLIST_LIST_DIVIDER2_COLOR; \
1121             ) \
1122          )
1123
1124 #define GENLIST_PART_DIVIDER_R(RIGHT) \
1125          GENLIST_PART_DIVIDER_PADDING \
1126          GENLIST_PART_RECT("elm.divider1", \
1127             mouse_events: 0; \
1128             GENLIST_DESCRIPTION_RTB("elm.divider2", "elm.padding.divider.top", "elm.padding.divider.bottom", \
1129                min: 1 0; \
1130                max: 1 -1; \
1131                fixed: 1 0; \
1132                rel1.offset: -1 0;\
1133                color: GENLIST_LIST_DIVIDER1_COLOR; \
1134             ) \
1135          ) \
1136          GENLIST_PART_RECT("elm.divider2", \
1137             mouse_events: 0; \
1138             GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.divider.top", "elm.padding.divider.bottom", \
1139                min: 1 0; \
1140                max: 1 -1; \
1141                fixed: 1 0; \
1142                rel1.offset: -1 0;\
1143                color: GENLIST_LIST_DIVIDER2_COLOR; \
1144             ) \
1145          )
1146
1147 #define GENLIST_PART_CENTER_LINE_LT(LEFT, TOP) \
1148          GENLIST_PART_SPACER("elm.padding.divider.left", \
1149             GENLIST_DESCRIPTION_L(LEFT, \
1150                min: 16 0; \
1151                max: 16 -1; \
1152                fixed: 1 0; \
1153             ) \
1154          ) \
1155          GENLIST_PART_SPACER("elm.padding.divider.right", \
1156             GENLIST_DESCRIPTION_ENVELOP("base", \
1157                min: 16 0; \
1158                max: 16 -1; \
1159                fixed: 1 0; \
1160                align: 1 0.5; \
1161                rel1.relative: 1 0; \
1162             ) \
1163          ) \
1164          GENLIST_PART_RECT("center_line", \
1165             mouse_events: 0; \
1166             GENLIST_DESCRIPTION_LRT("elm.padding.divider.left", "elm.padding.divider.right", TOP, \
1167                min: 0 1; \
1168                max: -1 1; \
1169                fixed: 0 1; \
1170                color: GENLIST_LIST_DIVIDER1_COLOR; \
1171             ) \
1172          ) \
1173          GENLIST_PART_RECT("center_line2", \
1174             GENLIST_DESCRIPTION_LRT("elm.padding.divider.left", "elm.padding.divider.right", "center_line", \
1175                min: 0 1; \
1176                max: -1 1; \
1177                fixed: 0 1; \
1178                color: GENLIST_LIST_DIVIDER2_COLOR; \
1179             ) \
1180          )
1181
1182 #define GENLIST_PART_COLORBAR \
1183          GENLIST_PART_SPACER("elm.padding.colorbar.top", \
1184              GENLIST_DESCRIPTION_ENVELOP("base", \
1185                align: 0.5 0; \
1186                fixed: 0 1; \
1187                min: 0 4; \
1188                max: -1 4; \
1189                rel2.relative: 1 0; \
1190              ) \
1191          ) \
1192          GENLIST_PART_SPACER("elm.padding.colorbar.bottom", \
1193              GENLIST_DESCRIPTION_ENVELOP("base", \
1194                align: 0.5 1; \
1195                fixed: 0 1; \
1196                min: 0 4; \
1197                max: -1 4; \
1198                rel1.relative: 0 1; \
1199              ) \
1200          ) \
1201          GENLIST_PART_ICON("elm.swallow.colorbar", \
1202             GENLIST_DESCRIPTION_TB("elm.padding.colorbar.top", "elm.padding.colorbar.bottom", \
1203                min: GENLIST_ICON_COLORBAR_SIZE 0; \
1204                max: GENLIST_ICON_COLORBAR_SIZE -1; \
1205                fixed: 1 0; \
1206                align: 0 0.5; \
1207                rel1.relative: 0 1; \
1208                rel2.relative: 0 0; \
1209             ) \
1210          )
1211
1212 #define GENLIST_PART_COLORBAR_DIALOGUE \
1213          GENLIST_PART_SPACER("elm.padding.colorbar.top", \
1214              GENLIST_DESCRIPTION_ENVELOP("base", \
1215                align: 0.5 0; \
1216                fixed: 0 1; \
1217                min: 0 4; \
1218                max: -1 4; \
1219                rel2.relative: 1 0; \
1220              ) \
1221          ) \
1222          GENLIST_PART_SPACER("elm.padding.colorbar.bottom", \
1223              GENLIST_DESCRIPTION_ENVELOP("base", \
1224                align: 0.5 1; \
1225                fixed: 0 1; \
1226                min: 0 4; \
1227                max: -1 4; \
1228                rel1.relative: 0 1; \
1229              ) \
1230          ) \
1231          GENLIST_PART_SPACER("elm.padding.colorbar.left", \
1232              description{ state: "default" 0.0; \
1233                min: 19 0; \
1234                max: 19 -1; \
1235                fixed: 1 0; \
1236                align: 0 0.5; \
1237                rel1.to: "base"; \
1238                rel2.to: "base"; \
1239                rel2.relative: 0 1; \
1240              } \
1241          ) \
1242          GENLIST_PART_ICON("elm.swallow.colorbar", \
1243             GENLIST_DESCRIPTION_LTB("elm.padding.colorbar.left","elm.padding.colorbar.top", "elm.padding.colorbar.bottom", \
1244                min: GENLIST_ICON_COLORBAR_SIZE 0; \
1245                max: GENLIST_ICON_COLORBAR_SIZE -1; \
1246                fixed: 1 0; \
1247             ) \
1248          )
1249
1250 //****************************************************************************//
1251 //********************************* PADDING **********************************//
1252 //****************************************************************************//
1253 #define GENLIST_PART_EXPANDED_PAD \
1254          part { name: "elm.swallow.pad"; \
1255             type: SWALLOW; \
1256             scale: 1; \
1257             mouse_events: 0; \
1258             description { state: "default" 0.0; \
1259                visible: 0; \
1260                min: 0 0; \
1261                fixed: 1 0; \
1262                align: 0.0 0.5; \
1263                rel1.to: "base"; \
1264                rel2.to: "base"; \
1265                rel2.relative: 0.0 1.0; \
1266             } \
1267          } \
1268
1269 #define GENLIST_PART_PADDING( NAME, SIZE, REL1, REL2 ) \
1270       GENLIST_PART_SPACER(NAME, \
1271          description { state: "default" 0.0; \
1272             min: SIZE 0; \
1273             max: SIZE -1; \
1274             fixed: 1 0; \
1275             align: 0.5 0.5; \
1276             rel1 { \
1277                relative: REL1; \
1278                to: "base"; \
1279             } \
1280             rel2 { \
1281                relative: REL2; \
1282                to: "base"; \
1283             } \
1284          } \
1285       )
1286
1287 #define GENLIST_DESCRIPTION_DECORATE_PADDING \
1288    description { state: "decorate" 0.0; \
1289       inherit: "default" 0.0; \
1290       min: 0 0; \
1291       max: 0 0; \
1292    }
1293
1294 #define GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1295    description { state: "decorate_reorder" 0.0; \
1296       inherit: "default" 0.0; \
1297       min: 0 0; \
1298       max: 0 0; \
1299    }
1300
1301 #define GENLIST_DESCRIPTION_REORDER_PADDING \
1302    description { state: "reorder" 0.0; \
1303       inherit: "default" 0.0; \
1304       min: 32 0; \
1305       max: 32 -1; \
1306    }
1307
1308 #define GENLIST_PART_PADDING_LEFT \
1309          GENLIST_PART_EXPANDED_PAD \
1310          GENLIST_PART_SPACER("elm.padding.left", \
1311             GENLIST_DESCRIPTION_L("elm.swallow.pad",  \
1312                min: GENLIST_PADDING_SIZE_LEFT 0; \
1313                max: GENLIST_PADDING_SIZE_LEFT -1; \
1314                fixed: 1 0; \
1315             ) \
1316             GENLIST_DESCRIPTION_DECORATE_PADDING \
1317             GENLIST_DESCRIPTION_REORDER_PADDING \
1318             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1319          )
1320
1321 #define GENLIST_PART_PADDING_LEFT_SIZE( SIZE ) \
1322          GENLIST_PART_EXPANDED_PAD \
1323          GENLIST_PART_SPACER("elm.padding.left", \
1324             GENLIST_DESCRIPTION_L("elm.swallow.pad",  \
1325                min: SIZE 0; \
1326                max: SIZE -1; \
1327                fixed: 1 0; \
1328             ) \
1329             GENLIST_DESCRIPTION_DECORATE_PADDING \
1330             GENLIST_DESCRIPTION_REORDER_PADDING \
1331             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1332          )
1333
1334 #define GENLIST_PART_EDITBTN \
1335    GENLIST_PART_SPACER("elm.padding.edit.right", \
1336       description { state: "default" 0.0; \
1337          fixed: 1 0; \
1338          align: 1.0 0.5; \
1339          rel1.relative: 1 0; \
1340          min: GENLIST_PADDING_SIZE_RIGHT 0; \
1341          max: GENLIST_PADDING_SIZE_RIGHT -1; \
1342       } \
1343    ) \
1344    GENLIST_PART_ICON("elm.icon.edit", \
1345       GENLIST_DESCRIPTION_R("elm.padding.edit.right", \
1346          visible: 0; \
1347       ) \
1348       description { state: "editmode" 0.0; \
1349          inherit: "default" 0.0; \
1350          visible: 1; \
1351          fixed: 1 1; \
1352          min: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE; \
1353          max: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE; \
1354       } \
1355    )
1356
1357 #define GENLIST_PART_PADDING_RIGHT \
1358          GENLIST_PART_SPACER("elm.padding.right", \
1359             description { state: "default" 0.0; \
1360                min: GENLIST_PADDING_SIZE_RIGHT 0; \
1361                max: GENLIST_PADDING_SIZE_RIGHT -1; \
1362                fixed: 1 0; \
1363                align: 1.0 0.5; \
1364                rel1.to: "base"; \
1365                rel2.to: "base"; \
1366                rel1.relative: 1 0; \
1367             } \
1368             GENLIST_DESCRIPTION_DECORATE_PADDING \
1369             GENLIST_DESCRIPTION_REORDER_PADDING \
1370             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1371          )
1372
1373 #define GENLIST_PART_PADDING_RIGHT_SIZE( SIZE ) \
1374          GENLIST_PART_SPACER("elm.padding.right", \
1375             description { state: "default" 0.0; \
1376                min: SIZE 0; \
1377                max: SIZE -1; \
1378                fixed: 1 0; \
1379                align: 1.0 0.5; \
1380                rel1.to: "base"; \
1381                rel2.to: "base"; \
1382                rel1.relative: 1 0; \
1383             } \
1384             GENLIST_DESCRIPTION_DECORATE_PADDING \
1385             GENLIST_DESCRIPTION_REORDER_PADDING \
1386             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1387          )
1388
1389 // FIXME: Use RECT instead of SPACER if this group is used on layout
1390 // for blocking events
1391 #define GENLIST_PART_PADDING_RIGHT_EDIT \
1392          GENLIST_PART_SPACER("elm.padding.right", \
1393             GENLIST_DESCRIPTION_R("elm.padding.right.edit", \
1394                min: DIALOGUE_PADDING_SIZE_RIGHT 0; \
1395                max: DIALOGUE_PADDING_SIZE_RIGHT -1; \
1396                fixed: 1 0; \
1397             ) \
1398             GENLIST_DESCRIPTION_DECORATE_PADDING \
1399             GENLIST_DESCRIPTION_REORDER_PADDING \
1400             GENLIST_DESCRIPTION_DECORATE_REORDER_PADDING \
1401          ) \
1402          GENLIST_PART_SPACER("elm.padding.right.edit", \
1403             description { state: "default" 0.0; \
1404                min:0 0; \
1405                max: 0 -1; \
1406                fixed: 1 0; \
1407                align: 1.0 0.5; \
1408                rel1.relative: 1 0; \
1409             } \
1410             description { state: "editmode" 0.0; \
1411                inherit: "default" 0.0; \
1412                min: (GENLIST_PADDING_SIZE_DEFAULT+GENLIST_ICON_MEDIUM_SIZE) 0; \
1413                max: (GENLIST_PADDING_SIZE_DEFAULT+GENLIST_ICON_MEDIUM_SIZE) -1; \
1414             } \
1415          ) \
1416          GENLIST_PART_EDITBTN
1417
1418 #define GENLIST_PART_PADDING_TOP \
1419          GENLIST_PART_SPACER("elm.padding.top", \
1420             description { \
1421                state: "default" 0.0; \
1422                min: 0 GENLIST_PADDING_SIZE_TOP; \
1423                max: -1 GENLIST_PADDING_SIZE_TOP; \
1424                fixed: 0 1; \
1425                rel1.to: "base"; \
1426                rel2.to: "base"; \
1427                rel2.relative: 1.0 0.0; \
1428                align: 0.5 0.0; \
1429             } \
1430          )
1431
1432 #define GENLIST_PART_PADDING_TOP_2LINE \
1433          GENLIST_PART_SPACER("elm.padding.top", \
1434             description { \
1435                state: "default" 0.0; \
1436                min: 0 GENLIST_PADDING_SIZE_TOP_2LINE; \
1437                max: -1 GENLIST_PADDING_SIZE_TOP_2LINE; \
1438                fixed: 0 1; \
1439                rel1.to: "base"; \
1440                rel2.to: "base"; \
1441                rel2.relative: 1.0 0.0; \
1442                align: 0.5 0.0; \
1443             } \
1444          )
1445
1446 #define GENLIST_PART_PADDING_TOP_SIZE( SIZE ) \
1447          GENLIST_PART_SPACER("elm.padding.top", \
1448             description { \
1449                state: "default" 0.0; \
1450                min: 0 SIZE; \
1451                max: -1 SIZE; \
1452                fixed: 0 1; \
1453                rel1.to: "base"; \
1454                rel2.to: "base"; \
1455                rel2.relative: 1.0 0.0; \
1456                align: 0.5 0.0; \
1457             } \
1458          )
1459
1460 #define GENLIST_PART_PADDING_BOTTOM \
1461          GENLIST_PART_SPACER("elm.padding.bottom", \
1462             description { state: "default" 0.0; \
1463                min: 0 GENLIST_PADDING_SIZE_BOTTOM; \
1464                max: -1 GENLIST_PADDING_SIZE_BOTTOM; \
1465                fixed: 0 1; \
1466                rel1.to: "base"; \
1467                rel2.to: "base"; \
1468                rel1.relative: 0.0 1.0; \
1469                align: 0.5 1.0; \
1470             } \
1471          )
1472
1473 #define GENLIST_PART_PADDING_BOTTOM_2LINE \
1474          GENLIST_PART_SPACER("elm.padding.bottom", \
1475             description { state: "default" 0.0; \
1476                min: 0 GENLIST_PADDING_SIZE_BOTTOM_2LINE; \
1477                max: -1 GENLIST_PADDING_SIZE_BOTTOM_2LINE; \
1478                fixed: 0 1; \
1479                rel1.to: "base"; \
1480                rel2.to: "base"; \
1481                rel1.relative: 0.0 1.0; \
1482                align: 0.5 1.0; \
1483             } \
1484          )
1485
1486 #define GENLIST_PART_PADDING_BOTTOM_SIZE( SIZE ) \
1487          GENLIST_PART_SPACER("elm.padding.bottom", \
1488             description { state: "default" 0.0; \
1489                min: 0 SIZE; \
1490                max: -1 SIZE; \
1491                fixed: 0 1; \
1492                rel1.to: "base"; \
1493                rel2.to: "base"; \
1494                rel1.relative: 0.0 1.0; \
1495                align: 0.5 1.0; \
1496             } \
1497          )
1498
1499 #define GENLIST_PART_PADDING_R( NAME, RIGHT ) \
1500          GENLIST_PART_SPACER(NAME, \
1501             description { state: "default" 0.0; \
1502                fixed: 1 0; \
1503                min: GENLIST_PADDING_SIZE_DEFAULT 0; \
1504                max: GENLIST_PADDING_SIZE_DEFAULT -1; \
1505                align: 1 0.5; \
1506                rel1 { \
1507                   relative: 0 0; \
1508                   to_x: RIGHT; \
1509                } \
1510                rel2 { \
1511                   relative: 0 1; \
1512                   to_x: RIGHT; \
1513                } \
1514             } \
1515          )
1516
1517 #define GENLIST_PART_PADDING_R_SIZE( NAME, RIGHT, SIZE ) \
1518          GENLIST_PART_SPACER(NAME, \
1519             description { state: "default" 0.0; \
1520                fixed: 1 0; \
1521                min: SIZE 0; \
1522                max: SIZE -1; \
1523                align: 1 0.5; \
1524                rel1 { \
1525                   relative: 0 0; \
1526                   to_x: RIGHT; \
1527                } \
1528                rel2 { \
1529                   relative: 0 1; \
1530                   to_x: RIGHT; \
1531                } \
1532             } \
1533          )
1534
1535 #define GENLIST_PART_PADDING_L( NAME, LEFT ) \
1536          GENLIST_PART_SPACER(NAME, \
1537             description { state: "default" 0.0; \
1538                fixed: 1 0; \
1539                min: GENLIST_PADDING_SIZE_DEFAULT 0; \
1540                max: GENLIST_PADDING_SIZE_DEFAULT -1; \
1541                align: 0 0.5; \
1542                rel1 { \
1543                   relative: 1 0; \
1544                   to_x: LEFT; \
1545                } \
1546                rel2 { \
1547                   relative: 1 1; \
1548                   to_x: LEFT; \
1549                } \
1550             } \
1551          )
1552
1553 #define GENLIST_PART_PADDING_L_SIZE( NAME, LEFT, SIZE ) \
1554          GENLIST_PART_SPACER(NAME, \
1555             description { state: "default" 0.0; \
1556                fixed: 1 0; \
1557                min: SIZE 0; \
1558                max: SIZE -1; \
1559                align: 0 0.5; \
1560                rel1 { \
1561                   relative: 1 0; \
1562                   to_x: LEFT; \
1563                } \
1564                rel2 { \
1565                   relative: 1 1; \
1566                   to_x: LEFT; \
1567                } \
1568             } \
1569          )
1570
1571
1572 #define GENLIST_PART_PADDING_T_SIZE( NAME, TOP, SIZE ) \
1573          GENLIST_PART_SPACER(NAME, \
1574             description { state: "default" 0.0; \
1575                min: 0 SIZE; \
1576                max: -1 SIZE; \
1577                fixed: 0 1; \
1578                align: 0.5 0; \
1579                rel1 { \
1580                   relative: 0 1; \
1581                   to: TOP; \
1582                } \
1583                rel2 { \
1584                   relative: 1 1; \
1585                   to: TOP; \
1586                } \
1587             } \
1588          )
1589
1590 #define GENLIST_PART_PADDING_B_SIZE( NAME, BOTTOM, SIZE ) \
1591          GENLIST_PART_SPACER(NAME, \
1592             description { state: "default" 0.0; \
1593                min: 0 SIZE; \
1594                max: -1 SIZE; \
1595                fixed: 0 1; \
1596                align: 0.5 1; \
1597                rel1 { \
1598                   relative: 0.5 0; \
1599                   to: BOTTOM; \
1600                } \
1601                rel2 { \
1602                   relative: 0.5 0; \
1603                   to: BOTTOM; \
1604                } \
1605             } \
1606          )
1607
1608 #define GENLIST_PROGRAM_EXPAND_ROOT( TARGET ) \
1609          program { \
1610             name: "go_expanded"; \
1611             signal: "elm,state,expanded"; \
1612             source: "elm"; \
1613             action: STATE_SET "expand_opened" 0.0; \
1614             TARGET \
1615          } \
1616          program { \
1617             name: "go_contracted"; \
1618             signal: "elm,state,contracted"; \
1619             source: "elm"; \
1620             action: STATE_SET "default" 0.0; \
1621             TARGET \
1622          } \
1623
1624 // 2.2.7 Genlist_Edit mode (Rename)
1625 // FIXME: padding is not needed when swallow content is NULL.
1626 // But how can edje know existence of swallow content?
1627 #define GENLIST_PART_FLIP \
1628          GENLIST_PART_RECT("elm.flip.bg", \
1629             mouse_events: 0; \
1630             description { state: "default" 0.0;\
1631                color: 0 0 0 0;\
1632             } \
1633             description { state: "flipped" 0.0; \
1634                inherit: "default" 0.0; \
1635                rel2.offset: 0 -3; \
1636                color: GENLIST_LIST_BG_COLOR;\
1637             }\
1638          ) \
1639          GENLIST_PART_SPACER("elm.flip.padding.left",  \
1640             description { state: "default" 0.0; \
1641                min: 26 0; \
1642                max: 26 -1; \
1643                fixed: 1 0; \
1644                align: 0 0.5; \
1645                rel2.relative: 0 1; \
1646             } \
1647          ) \
1648          GENLIST_PART_SPACER("elm.flip.padding.right", \
1649             description { state: "default" 0.0; \
1650                min: 26 0; \
1651                max: 26 -1; \
1652                fixed: 1 0; \
1653                align: 1 0.5; \
1654                rel1.relative: 1 0; \
1655             } \
1656          ) \
1657          GENLIST_PART_ICON("elm.flip.content", \
1658             GENLIST_DESCRIPTION("elm.flip.padding.left", "elm.flip.padding.eraser.left",  \
1659                "elm.padding.top", "elm.padding.bottom", \
1660                visible: 0; \
1661                aspect: 1 1; \
1662             ) \
1663             description { state: "flipped" 0.0; \
1664                inherit: "default" 0.0; \
1665                visible: 1; \
1666             } \
1667          ) \
1668          GENLIST_PART_PADDING_R("elm.flip.padding.eraser.left", "elm.flip.eraser") \
1669          GENLIST_PART_ICON("elm.flip.eraser", \
1670             GENLIST_DESCRIPTION_RTB("elm.flip.padding.icon.left",  \
1671                "elm.padding.top", "elm.padding.bottom", \
1672                fixed: 1 0; \
1673                visible: 0; \
1674                min: GENLIST_ICON_ENTRY_SIZE GENLIST_ICON_ENTRY_SIZE; \
1675                max: GENLIST_ICON_ENTRY_SIZE GENLIST_ICON_ENTRY_SIZE; \
1676             ) \
1677             description { state: "show" 0.0; \
1678                inherit: "default" 0.0; \
1679                visible: 1; \
1680             } \
1681          ) \
1682          GENLIST_PART_PADDING_R("elm.flip.padding.icon.left", "elm.flip.icon") \
1683          GENLIST_PART_ICON( "elm.flip.icon", \
1684             GENLIST_DESCRIPTION_RTB("elm.flip.padding.right", \
1685                "elm.padding.top", "elm.padding.bottom", \
1686                visible: 0; \
1687                aspect: 1 1; \
1688                align: 1 0.5; \
1689                max: 154 74; \
1690             ) \
1691             description { state: "flipped" 0.0; \
1692                inherit: "default" 0.0; \
1693                visible: 1; \
1694             } \
1695          )
1696
1697 //****************************************************************************//
1698 // *******************************  Programs ********************************//
1699 //**************************************************************************//
1700 // signal: elm,state,%s,active
1701 //   a "check" item named %s went active
1702 // signal: elm,state,%s,passive
1703 //   a "check" item named %s went passive
1704 // default is passive
1705 #define GENLIST_PROGRAM_DEFAULT( TARGET ) \
1706          program { name: "default"; \
1707             signal: "elm,state,default"; \
1708             source: "elm"; \
1709             action: STATE_SET "default" 0.0; \
1710             TARGET \
1711          } \
1712
1713 #define GENLIST_PROGRAM_DISABLED( TARGET ) \
1714          program { name: "enabled"; \
1715             signal: "elm,state,enabled"; \
1716             source: "elm"; \
1717             action: STATE_SET "default" 0.0; \
1718             target: "base"; \
1719             TARGET \
1720          } \
1721          program { name: "disabled"; \
1722             signal: "elm,state,disabled"; \
1723             source: "elm"; \
1724             action: STATE_SET "disabled" 0.0; \
1725             target: "base"; \
1726             TARGET \
1727          }
1728
1729 #define GENLIST_PROGRAM_FOCUS \
1730       program { name: "focused"; \
1731          signal: "elm,state,focused"; \
1732          source: "elm"; \
1733          action: STATE_SET "focused" 0.0; \
1734          target: "focus_part"; \
1735       } \
1736       program { name: "unfocused"; \
1737          signal: "elm,state,unfocused"; \
1738          source: "elm"; \
1739          action: STATE_SET "default" 0.0; \
1740          target: "focus_part"; \
1741       }
1742
1743 #define GENLIST_PROGRAM_FOCUS_DIALOGUE \
1744       program { name: "focused"; \
1745          signal: "elm,state,focused"; \
1746          source: "elm"; \
1747          script { \
1748             new st[31]; \
1749             new Float:vl; \
1750             get_state(PART:"bg_dialogue", st, 30, vl); \
1751             if (!strcmp(st, "top") || !strcmp(st, "top_selected")) \
1752                set_state(PART:"focus_part", "top_focused", 0.0); \
1753             else if (!strcmp(st, "center") || !strcmp(st, "center_selected")) \
1754                set_state(PART:"focus_part", "center_focused", 0.0); \
1755             else if (!strcmp(st, "bottom") || !strcmp(st, "bottom_selected")) \
1756                set_state(PART:"focus_part", "bottom_focused", 0.0); \
1757             else if (!strcmp(st, "default") || !strcmp(st, "selected")) \
1758                set_state(PART:"focus_part", "focused", 0.0); \
1759          } \
1760       } \
1761       program { name: "unfocused"; \
1762          signal: "elm,state,unfocused"; \
1763          source: "elm"; \
1764          action: STATE_SET "default" 0.0; \
1765          target: "focus_part"; \
1766       }
1767
1768 #define GENLIST_PROGRAM_SOUND( SRC ) \
1769       program { name: "play_sound"SRC; \
1770          signal: "mouse,clicked,1"; \
1771          source: SRC; \
1772          script { \
1773             new st[31]; \
1774             new Float:vl; \
1775             get_state(PART:"base", st, 30, vl); \
1776             if (strcmp(st, "disabled")) \
1777                run_program(PROGRAM:"play_button_press"SRC); \
1778          } \
1779       } \
1780       program { name: "play_button_press"SRC; \
1781          action: PLAY_SAMPLE "button-pressed" 1.0; \
1782       }
1783
1784 #define GENLIST_PROGRAM_SELECT( TARGET ) \
1785          program { name: "selected"; \
1786             signal: "elm,state,selected"; \
1787             source: "elm"; \
1788             action: STATE_SET "selected" 0.0; \
1789             TARGET \
1790          } \
1791          program { name: "unselected"; \
1792             signal: "elm,state,unselected"; \
1793             source: "elm"; \
1794             action: STATE_SET "default" 0.0; \
1795             TARGET \
1796          }
1797
1798 #define GENLIST_PROGRAM_BG_DIALOGUE \
1799          program { name: "bg_default"; \
1800             signal: "elm,state,default"; \
1801             source: "*"; \
1802             action: STATE_SET "default" 0.0; \
1803             target: "bg_dialogue"; \
1804          } \
1805          program { name: "bg_top"; \
1806             signal: "elm,state,top"; \
1807             source: "*"; \
1808             action: STATE_SET "top" 0.0; \
1809             target: "bg_dialogue"; \
1810          } \
1811          program { name: "bg_center"; \
1812             signal: "elm,state,center"; \
1813             source: "*"; \
1814             action: STATE_SET "center" 0.0; \
1815             target: "bg_dialogue"; \
1816          } \
1817          program { name: "bg_bottom"; \
1818             signal: "elm,state,bottom"; \
1819             source: "*"; \
1820             action: STATE_SET "bottom" 0.0; \
1821             target: "bg_dialogue"; \
1822          }
1823
1824 #define GENLIST_PROGRAM_SELECT_DIALOGUE( TARGET ) \
1825          program { name: "selected"; \
1826             signal: "elm,state,selected"; \
1827             source: "elm"; \
1828             script { \
1829                new st[31]; \
1830                new Float:vl; \
1831                get_state(PART:"bg_dialogue", st, 30, vl); \
1832                if (!strcmp(st, "top")) \
1833                   set_state(PART:"bg_dialogue", "top_selected", 0.0); \
1834                else if (!strcmp(st, "center")) \
1835                   set_state(PART:"bg_dialogue", "center_selected", 0.0); \
1836                else if (!strcmp(st, "bottom")) \
1837                   set_state(PART:"bg_dialogue", "bottom_selected", 0.0); \
1838                else if (!strcmp(st, "default")) \
1839                   set_state(PART:"bg_dialogue", "selected", 0.0); \
1840                run_program(PROGRAM:"target_selected"); \
1841             } \
1842          } \
1843          program { name: "unselected"; \
1844             signal: "elm,state,unselected"; \
1845             source: "elm"; \
1846             script { \
1847                new st[31]; \
1848                new Float:vl; \
1849                get_state(PART:"bg_dialogue", st, 30, vl); \
1850                if (!strcmp(st, "top_selected")) \
1851                   set_state(PART:"bg_dialogue", "top", 0.0); \
1852                else if (!strcmp(st, "center_selected"))  \
1853                   set_state(PART:"bg_dialogue", "center", 0.0); \
1854                else if (!strcmp(st, "bottom_selected"))  \
1855                   set_state(PART:"bg_dialogue", "bottom", 0.0); \
1856                else if (!strcmp(st, "selected")) \
1857                   set_state(PART:"bg_dialogue", "default", 0.0); \
1858                run_program(PROGRAM:"target_unselected"); \
1859             } \
1860          } \
1861          program { name: "target_selected"; \
1862             action: STATE_SET "selected" 0.0; \
1863             TARGET \
1864          }\
1865          program { name: "target_unselected"; \
1866             action: STATE_SET "default" 0.0; \
1867             TARGET \
1868          } \
1869          GENLIST_PROGRAM_BG_DIALOGUE
1870
1871
1872 #define GENLIST_PROGRAM_SELECT_ARROW \
1873          program { name: "selected_arrow"; \
1874             signal: "elm,state,selected"; \
1875             source: "elm"; \
1876             script { \
1877                new st[31]; \
1878                new Float:vl; \
1879                get_state(PART:"arrow", st, 30, vl); \
1880                if (!strcmp(st, "default")) { \
1881                   set_state(PART:"arrow", "default_press", 0.0); \
1882                   set_state(PART:"arrow_clip", "default_press", 0.0); \
1883                } \
1884                else if (!strcmp(st, "expand_opened")) { \
1885                   set_state(PART:"arrow", "expand_opened_press", 0.0); \
1886                   set_state(PART:"arrow_clip", "expand_opened_press", 0.0); \
1887                } \
1888             } \
1889          } \
1890          program { name: "unselected_arrow"; \
1891             signal: "elm,state,unselected"; \
1892             source: "elm"; \
1893             script { \
1894                new st[31]; \
1895                new Float:vl; \
1896                get_state(PART:"arrow", st, 30, vl); \
1897                if (!strcmp(st, "default_press")) { \
1898                   set_state(PART:"arrow", "default", 0.0); \
1899                   set_state(PART:"arrow_clip", "default", 0.0); \
1900                } \
1901                else if (!strcmp(st, "expand_opened_press")) { \
1902                   set_state(PART:"arrow", "expand_opened", 0.0); \
1903                   set_state(PART:"arrow_clip", "expand_opened", 0.0); \
1904                } \
1905             } \
1906          }
1907
1908 #define GENLIST_PROGRAM_DECORATE( TARGET ) \
1909          program { name: "decorate_enabled_effect"; \
1910             signal: "elm,state,decorate,enabled,effect";\
1911             source: "elm";\
1912             action:  STATE_SET "decorate" 0.0;\
1913             TARGET \
1914          }\
1915          program { name: "decorate_disabled_effect";\
1916             signal: "elm,state,decorate,disabled,effect";\
1917             source: "elm";\
1918             action: STATE_SET "default" 0.0; \
1919             TARGET \
1920          }\
1921          program { name: "decorate_enabled";\
1922             signal: "elm,state,decorate,enabled";\
1923             source: "elm";\
1924             action:  STATE_SET "decorate" 0.0;\
1925             TARGET \
1926          }\
1927          program { name: "decorate_disabled";\
1928             signal: "elm,state,decorate,disabled";\
1929             source: "elm";\
1930             action:  STATE_SET "default" 0.0;\
1931             TARGET \
1932          }
1933
1934 #define GENLIST_PROGRAM_REORDER( TARGET ) \
1935          program { name: "reorder_enabled"; \
1936             signal: "elm,state,reorder,mode_set"; \
1937             source: "elm"; \
1938             action: STATE_SET "reorder" 0.0; \
1939             TARGET \
1940          } \
1941          program { name: "reorder_disabled"; \
1942             signal: "elm,state,reorder,mode_unset"; \
1943             source: "elm"; \
1944             action: STATE_SET "default" 0.0; \
1945             TARGET \
1946          }
1947
1948 #define GENLIST_PROGRAM_DECORATE_REORDER( NAME, TARGET ) \
1949          program { name: "reorder_enabled"NAME; \
1950             signal: "elm,state,reorder,mode_set"; \
1951             source: "elm"; \
1952             script { \
1953                new st[31]; \
1954                new Float:vl; \
1955                get_state(PART:"state", st, 30, vl); \
1956                if (!strcmp(st, "decorate") || !strcmp(st, "decorate_reorder")) { \
1957                   run_program(PROGRAM:"decorate_reorder_set"NAME); \
1958                } else { \
1959                   run_program(PROGRAM:"reorder_set"NAME); \
1960                } \
1961             } \
1962          } \
1963          program { name: "reorder_disabled"NAME; \
1964             signal: "elm,state,reorder,mode_unset"; \
1965             source: "elm"; \
1966             script { \
1967                new st[31]; \
1968                new Float:vl; \
1969                get_state(PART:"state", st, 30, vl); \
1970                if (!strcmp(st, "decorate") || !strcmp(st, "decorate_reorder")) { \
1971                   run_program(PROGRAM:"decorate_set"NAME); \
1972                } else { \
1973                   run_program(PROGRAM:"default_set"NAME); \
1974                } \
1975             } \
1976          } \
1977          program { name: "decorate_enabled_effect"NAME; \
1978             signal: "elm,state,decorate,enabled,effect";\
1979             source: "elm";\
1980             script { \
1981                new st[31]; \
1982                new Float:vl; \
1983                get_state(PART:"state", st, 30, vl); \
1984                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
1985                   run_program(PROGRAM:"decorate_reorder_set"NAME); \
1986                } else { \
1987                   run_program(PROGRAM:"decorate_set"NAME); \
1988                } \
1989             } \
1990          }\
1991          program { name: "decorate_disabled_effect"NAME;\
1992             signal: "elm,state,decorate,disabled,effect";\
1993             source: "elm";\
1994             script { \
1995                new st[31]; \
1996                new Float:vl; \
1997                get_state(PART:"state", st, 30, vl); \
1998                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
1999                   run_program(PROGRAM:"reorder_set"NAME); \
2000                } else { \
2001                   run_program(PROGRAM:"default_set"NAME); \
2002                } \
2003             } \
2004          }\
2005          program { name: "decorate_enabled"NAME;\
2006             signal: "elm,state,decorate,enabled";\
2007             source: "elm";\
2008             script { \
2009                new st[31]; \
2010                new Float:vl; \
2011                get_state(PART:"state", st, 30, vl); \
2012                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
2013                   run_program(PROGRAM:"decorate_reorder_set"NAME); \
2014                } else { \
2015                   run_program(PROGRAM:"decorate_set"NAME); \
2016                } \
2017             } \
2018          }\
2019          program { name: "decorate_disabled"NAME;\
2020             signal: "elm,state,decorate,disabled";\
2021             source: "elm";\
2022             script { \
2023                new st[31]; \
2024                new Float:vl; \
2025                get_state(PART:"state", st, 30, vl); \
2026                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
2027                   run_program(PROGRAM:"reorder_set"NAME); \
2028                } else { \
2029                   run_program(PROGRAM:"default_set"NAME); \
2030                } \
2031             } \
2032          } \
2033          program { name: "default_set"NAME; \
2034             action: STATE_SET "default" 0.0;\
2035             target: "state"; \
2036             TARGET \
2037          } \
2038          program { name: "decorate_set"NAME; \
2039             action: STATE_SET "decorate" 0.0;\
2040             target: "state"; \
2041             TARGET \
2042          } \
2043          program { name: "reorder_set"NAME; \
2044             action: STATE_SET "reorder" 0.0;\
2045             target: "state"; \
2046             TARGET \
2047          } \
2048          program { name: "decorate_reorder_set"NAME; \
2049             action: STATE_SET "decorate_reorder" 0.0;\
2050             target: "state"; \
2051             TARGET \
2052          }
2053
2054 #define GENLIST_PROGRAM_FLIP \
2055          program { name: "flip_enabled"; \
2056             signal:  "elm,state,flip,enabled"; \
2057             source:  "elm"; \
2058             transition: DECELERATE 0.5; \
2059             action:  STATE_SET "flipped" 0.0; \
2060             target: "elm.flip.content"; \
2061             target: "elm.flip.icon"; \
2062          } \
2063          program { name: "flip_disabled"; \
2064             signal:  "elm,state,flip,disabled"; \
2065             source:  "elm"; \
2066             transition: DECELERATE 0.5; \
2067             action:  STATE_SET "default" 0.0; \
2068             target: "elm.flip.content"; \
2069             target: "elm.flip.icon"; \
2070          } \
2071          program { name: "flip_enabled_bg"; \
2072             signal:  "elm,state,flip,enabled"; \
2073             source:  "elm"; \
2074             action:  STATE_SET "flipped" 0.0; \
2075             target: "elm.flip.bg"; \
2076          } \
2077          program { name: "flip_disabled_bg"; \
2078             signal:  "elm,state,flip,disabled"; \
2079             source:  "elm"; \
2080             action:  STATE_SET "default" 0.0; \
2081             target: "elm.flip.bg"; \
2082          } \
2083          program { \
2084             signal: "elm,state,eraser,show"; \
2085             action: STATE_SET "show" 0.0; \
2086             target: "elm.flip.eraser"; \
2087          } \
2088          program { \
2089             signal: "elm,state,eraser,hide"; \
2090             action: STATE_SET "default" 0.0; \
2091             target: "elm.flip.eraser"; \
2092          }
2093
2094 #define GENLIST_PROGRAM_FLIP_TARGET( TARGET ) \
2095          program { name: "flip_enabled_target"; \
2096             signal:  "elm,state,flip,enabled"; \
2097             source:  "elm"; \
2098             action:  STATE_SET "flipped" 0.0; \
2099             TARGET \
2100          } \
2101          program { name: "flip_disabled_target"; \
2102             signal:  "elm,state,flip,disabled"; \
2103             source:  "elm"; \
2104             action:  STATE_SET "default" 0.0; \
2105             TARGET \
2106          }
2107
2108 #define GENLIST_PROGRAM_FLIP_EFFECT_TARGET( TARGET ) \
2109          program { name: "flip_enabled_effect"; \
2110             signal:  "elm,state,flip,enabled"; \
2111             source:  "elm"; \
2112             transition: DECELERATE 0.5; \
2113             action:  STATE_SET "flipped" 0.0; \
2114             TARGET \
2115          } \
2116          program { name: "flip_disabled_effect"; \
2117             signal:  "elm,state,flip,disabled"; \
2118             source:  "elm"; \
2119             transition: DECELERATE 0.5; \
2120             action:  STATE_SET "default" 0.0; \
2121             TARGET \
2122          }
2123
2124 #define GENLIST_PROGRAM_EDITMODE \
2125    program { name: "edit_enabled"; \
2126       signal:  "elm,state,edit,enabled"; \
2127       source:  "*"; \
2128       action:  STATE_SET "editmode" 0.0; \
2129       target: "elm.padding.right.edit"; \
2130       target: "elm.icon.edit"; \
2131       target: "bg_dialogue_right"; \
2132    } \
2133    program { name: "edit_disabled"; \
2134       signal:  "elm,state,edit,disabled"; \
2135       source:  "*"; \
2136       action:  STATE_SET "default" 0.0; \
2137       target: "elm.padding.right.edit"; \
2138       target: "elm.icon.edit"; \
2139       target: "bg_dialogue_right"; \
2140    }
2141
2142 /***************************************************************************/
2143 /***************************************************************************/
2144
2145 #define GENLIST_PROGRAMS_NORMAL( TARGET ) \
2146    programs { \
2147       GENLIST_PROGRAM_DEFAULT( TARGET \
2148          target: "bg"; \
2149          target: "bg_clip"; \
2150          target: "bottom_line"; \
2151          target: "bottom_line2"; \
2152          target: "bottom_line_clip"; \
2153          target: "bg_reorder"; \
2154          target: "elm.padding.left"; \
2155          target: "elm.padding.right"; \
2156       ) \
2157       GENLIST_PROGRAM_DISABLED( TARGET \
2158          target: "bg"; \
2159          target: "bottom_line"; \
2160          target: "bottom_line2"; \
2161          target: "bg_reorder"; \
2162       ) \
2163       GENLIST_PROGRAM_FOCUS \
2164       GENLIST_PROGRAM_SELECT( TARGET \
2165          target: "bg"; \
2166          target: "bottom_line"; \
2167          target: "bottom_line2"; \
2168          target: "bg_reorder"; \
2169       ) \
2170       GENLIST_PROGRAM_SOUND("bg") \
2171       GENLIST_PROGRAM_SOUND("bg_reorder") \
2172       GENLIST_PROGRAM_DECORATE_REORDER("normal", TARGET \
2173          target: "bg_clip"; \
2174          target: "bg_reorder_clip"; \
2175          target: "bottom_line_clip"; \
2176          target: "elm.padding.left"; \
2177          target: "elm.padding.right"; \
2178       ) \
2179       GENLIST_PROGRAM_FLIP \
2180    }
2181
2182 #define GENLIST_PROGRAMS_DIALOGUE( TARGET ) \
2183    programs { \
2184       GENLIST_PROGRAM_DEFAULT( TARGET \
2185          target: "bg_dialogue"; \
2186          target: "bg_dialogue_clip"; \
2187          target: "elm.padding.left"; \
2188          target: "elm.padding.right"; \
2189       ) \
2190       GENLIST_PROGRAM_DISABLED( TARGET ) \
2191       GENLIST_PROGRAM_FOCUS_DIALOGUE \
2192       GENLIST_PROGRAM_SELECT_DIALOGUE( TARGET ) \
2193       program { name: "bg_color_change"; \
2194          signal: "bg_color_change"; \
2195          source: "elm"; \
2196          action: STATE_SET "2depth" 0.0; \
2197          target: "bg_dialogue_clip"; \
2198       } \
2199       GENLIST_PROGRAM_SOUND("bg_dialogue") \
2200       GENLIST_PROGRAM_DECORATE_REORDER( "normal", TARGET \
2201          target: "elm.padding.left"; \
2202          target: "elm.padding.right"; \
2203       ) \
2204       GENLIST_PROGRAM_FLIP \
2205       GENLIST_PROGRAM_EDITMODE \
2206    }
2207
2208 #define GENLIST_PROGRAMS_DECORATE_EFFECT( TARGET ) \
2209    program { name: "decorate_enabled_effect_ef"; \
2210       signal: "elm,state,decorate,enabled,effect";\
2211       source: "elm";\
2212       transition: DECELERATE 0.5;\
2213       action:  STATE_SET "decorate" 0.0;\
2214       TARGET \
2215    }\
2216    program { name: "decorate_disabled_effect_ef";\
2217       signal: "elm,state,decorate,disabled,effect";\
2218       source: "elm";\
2219       transition: ACCELERATE 0.5;\
2220       action:  STATE_SET "default" 0.0;\
2221       TARGET \
2222    } \
2223    program { name: "decorate_enabled_ef";\
2224       signal: "elm,state,decorate,enabled";\
2225       source: "elm";\
2226       action:  STATE_SET "decorate" 0.0;\
2227       TARGET \
2228    }\
2229    program { name: "decorate_disabled_ef";\
2230       signal: "elm,state,decorate,disabled";\
2231       source: "elm";\
2232       action:  STATE_SET "default" 0.0;\
2233       TARGET \
2234    }
2235
2236 #define GENLIST_PROGRAMS_ENTRY( TARGET ) \
2237    GENLIST_PROGRAM_DEFAULT( TARGET \
2238       target: "bg"; \
2239       target: "bg_clip"; \
2240       target: "bottom_line"; \
2241       target: "bottom_line2"; \
2242       target: "bottom_line_clip"; \
2243       target: "bg_reorder"; \
2244       target: "elm.padding.left"; \
2245       target: "elm.padding.right"; \
2246    ) \
2247    GENLIST_PROGRAM_DISABLED( TARGET ) \
2248    GENLIST_PROGRAM_FOCUS \
2249    GENLIST_PROGRAM_DECORATE_REORDER("editfield", TARGET \
2250       target: "bg_clip"; \
2251       target: "bg_reorder_clip"; \
2252       target: "bottom_line_clip"; \
2253       target: "elm.padding.left"; \
2254       target: "elm.padding.right"; \
2255    )
2256
2257 #define GENLIST_PROGRAMS_DIALOGUE_ENTRY( TARGET ) \
2258    GENLIST_PROGRAM_DEFAULT( TARGET \
2259       target: "bg_dialogue"; \
2260       target: "bg_dialogue_clip"; \
2261       target: "elm.padding.left"; \
2262       target: "elm.padding.right"; \
2263    ) \
2264    GENLIST_PROGRAM_DISABLED( TARGET ) \
2265    GENLIST_PROGRAM_FOCUS_DIALOGUE \
2266    program { name: "bg_color_change"; \
2267       signal: "bg_color_change"; \
2268       source: "elm"; \
2269       action: STATE_SET "2depth" 0.0; \
2270       target: "bg_dialogue_clip"; \
2271    } \
2272    GENLIST_PROGRAM_BG_DIALOGUE \
2273    GENLIST_PROGRAM_DECORATE_REORDER( "normal", TARGET \
2274       target: "elm.padding.left"; \
2275       target: "elm.padding.right"; \
2276    ) \
2277    GENLIST_PROGRAM_FLIP \
2278    GENLIST_PROGRAM_EDITMODE
2279
2280
2281 #define GENLIST_PROGRAMS_THUMB \
2282    GENLIST_PROGRAM_DECORATE_REORDER( "thumb", target: "elm.thumb"; ) \
2283    GENLIST_PROGRAM_FLIP_TARGET( target: "elm.thumb.clip"; ) \
2284    program { name: "enabled_thumb"; \
2285       signal: "elm,state,enabled"; \
2286       source: "elm"; \
2287       action: STATE_SET "default" 0.0; \
2288       target: "base"; \
2289       target: "elm.thumb"; \
2290    } \
2291    program { name: "disabled_thumb"; \
2292       signal: "elm,state,disabled"; \
2293       source: "elm"; \
2294       action: STATE_SET "disabled" 0.0; \
2295       target: "base"; \
2296       target: "elm.thumb"; \
2297    } \
2298    program { name: "selected_thumb"; \
2299       signal: "elm,state,selected"; \
2300       source: "elm"; \
2301       script { \
2302          new st[31]; \
2303          new Float:vl; \
2304          get_state(PART:"elm.thumb", st, 30, vl); \
2305          if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) \
2306             set_state(PART:"elm.thumb", "reorder_selected", 0.0); \
2307          else \
2308             set_state(PART:"elm.thumb", "selected", 0.0); \
2309       } \
2310    } \
2311    program { name: "unselected_thumb"; \
2312       signal: "elm,state,unselected"; \
2313       source: "elm"; \
2314       script { \
2315          new st[31]; \
2316          new Float:vl; \
2317          get_state(PART:"elm.thumb", st, 30, vl); \
2318          if (!strcmp(st, "reorder_selected")) \
2319             set_state(PART:"elm.thumb", "reorder", 0.0); \
2320          else \
2321             set_state(PART:"elm.thumb", "default", 0.0); \
2322       } \
2323    }
2324
2325 //****************************************************************************//
2326 // *******************************  Icon Part ******************************//
2327 //***************************************************************************//
2328 #define GENLIST_PART_ICON(NAME, DESCRIPION) \
2329    part { name: NAME; \
2330       scale: 1; \
2331       type: SWALLOW; \
2332       DESCRIPION \
2333    }
2334
2335 #define GENLIST_PARAM_ICON_BIG \
2336          min: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE; \
2337          max: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE;
2338
2339 #define GENLIST_PARAM_ICON_SMALL \
2340          min: GENLIST_ICON_SMALL_SIZE GENLIST_ICON_SMALL_SIZE; \
2341          max: GENLIST_ICON_SMALL_SIZE GENLIST_ICON_SMALL_SIZE;
2342
2343 #define GENLIST_PARAM_ICON_BTN_01 \
2344          min: 0 GENLIST_BTN_01_HEIGHT; \
2345          max: -1 GENLIST_BTN_01_HEIGHT;
2346
2347 #define GENLIST_PARAM_ICON_BTN_02 \
2348          min: GENLIST_BTN_02_SIZE GENLIST_BTN_02_SIZE; \
2349          max: GENLIST_BTN_02_SIZE GENLIST_BTN_02_SIZE;
2350
2351 #define GENLIST_PARAM_ICON_ONOFF_WIDTH \
2352          min: GENLIST_ICON_ONOFF_WIDTH GENLIST_ICON_ONOFF_HEIGHT; \
2353          max: GENLIST_ICON_ONOFF_WIDTH GENLIST_ICON_ONOFF_HEIGHT;
2354
2355 #define GENLIST_PARAM_ICON_THUMBNAIL1\
2356          min: GENLIST_ICON_LARGE_SIZE GENLIST_ICON_LARGE_SIZE; \
2357          max: GENLIST_ICON_LARGE_SIZE GENLIST_ICON_LARGE_SIZE;
2358
2359 #define GENLIST_PARAM_ICON_CHECK_RADIO \
2360          min: GENLIST_ICON_CHECK_RADIO_SIZE GENLIST_ICON_CHECK_RADIO_SIZE; \
2361          max: GENLIST_ICON_CHECK_RADIO_SIZE GENLIST_ICON_CHECK_RADIO_SIZE;
2362
2363 #define GENLIST_PARAM_ICON_STAR \
2364          min: GENLIST_ICON_STAR_SIZE GENLIST_ICON_STAR_SIZE; \
2365          max: GENLIST_ICON_STAR_SIZE GENLIST_ICON_STAR_SIZE; \
2366
2367 #define GENLIST_PART_ICON_BIG_R(NAME, RIGHT) \
2368    GENLIST_PART_ICON(NAME, \
2369       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2370          fixed: 1 1; \
2371          GENLIST_PARAM_ICON_BIG \
2372       ) \
2373    )
2374
2375 #define GENLIST_PART_ICON_BIG_L(NAME, LEFT) \
2376    GENLIST_PART_ICON(NAME, \
2377       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2378          GENLIST_PARAM_ICON_BIG \
2379          fixed: 1 1; \
2380       ) \
2381    )
2382
2383 #define GENLIST_PART_ICON_SMALL_L(NAME, LEFT) \
2384    GENLIST_PART_ICON(NAME, \
2385       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2386          GENLIST_PARAM_ICON_SMALL \
2387          fixed: 1 1; \
2388       ) \
2389    )
2390
2391 #define GENLIST_PART_ICON_SMALL_LB(NAME, LEFT, BOTTOM) \
2392    GENLIST_PART_ICON(NAME, \
2393       GENLIST_DESCRIPTION_LB(LEFT, BOTTOM, \
2394         GENLIST_PARAM_ICON_SMALL \
2395         fixed: 1 1; \
2396       ) \
2397    )
2398
2399 #define GENLIST_PART_ICON_SMALL_LTB(NAME, LEFT, TOP, BOTTOM) \
2400    GENLIST_PART_ICON(NAME, \
2401       GENLIST_DESCRIPTION_LTB(LEFT, TOP, BOTTOM, \
2402          GENLIST_PARAM_ICON_SMALL \
2403          fixed: 1 1; \
2404       ) \
2405    )
2406
2407 #define GENLIST_PART_ICON_SMALL_RTB(NAME, RIGHT, TOP, BOTTOM) \
2408    GENLIST_PART_ICON(NAME, \
2409       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
2410          GENLIST_PARAM_ICON_SMALL \
2411          fixed: 1 1; \
2412       ) \
2413    )
2414
2415 #define GENLIST_PART_ICON_BTN_01_RTB(NAME, RIGHT, TOP, BOTTOM) \
2416    GENLIST_PART_ICON(NAME, \
2417       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM,\
2418          GENLIST_PARAM_ICON_BTN_01 \
2419          fixed: 1 1; \
2420       ) \
2421    )
2422
2423 #define GENLIST_PART_ICON_BTN_02_RTB(NAME, RIGHT, TOP, BOTTOM) \
2424    GENLIST_PART_ICON(NAME, \
2425       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM,\
2426          GENLIST_PARAM_ICON_BTN_02 \
2427          fixed: 1 1; \
2428       ) \
2429    )
2430
2431 #define GENLIST_PART_ICON_BTN_ONOFF_R(NAME, RIGHT) \
2432    GENLIST_PART_ICON(NAME, \
2433       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2434          GENLIST_PARAM_ICON_ONOFF_WIDTH \
2435          fixed: 1 1; \
2436       ) \
2437    )
2438
2439 #define GENLIST_PART_ICON_BTN_ONOFF_L(NAME, LEFT) \
2440    GENLIST_PART_ICON(NAME, \
2441       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2442          GENLIST_PARAM_ICON_ONOFF_WIDTH \
2443          fixed: 1 1; \
2444       ) \
2445    )
2446
2447 #define GENLIST_PART_ICON_THUMBNAIL1_R(NAME, RIGHT) \
2448    GENLIST_PART_ICON(NAME, \
2449       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2450          GENLIST_PARAM_ICON_THUMBNAIL1 \
2451          fixed: 1 1; \
2452       ) \
2453    )
2454
2455 #define GENLIST_PART_ICON_CHECK_RADIO_L(NAME, LEFT) \
2456    GENLIST_PART_ICON(NAME, \
2457       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2458          GENLIST_PARAM_ICON_CHECK_RADIO \
2459          fixed: 1 1; \
2460       ) \
2461    )
2462
2463 #define GENLIST_PART_ICON_STAR_RTB(NAME, RIGHT, TOP, BOTTOM) \
2464    GENLIST_PART_ICON(NAME, \
2465       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
2466          GENLIST_PARAM_ICON_STAR \
2467          fixed: 1 1; \
2468       ) \
2469    )
2470
2471 /*****************************************************************************/
2472 /******************************* Genlist IMAGE ********************************/
2473 /*****************************************************************************/
2474 #define GENLIST_PART_IMAGE(NAME, DESCRIPION) \
2475    part { name: NAME; \
2476       scale: 1; \
2477       type: IMAGE; \
2478       DESCRIPION \
2479    }
2480
2481 #define GENLIST_PARAM_PASSWORD_IMAGE \
2482             min: GENLIST_ICON_PASSWORD_SIZE GENLIST_ICON_PASSWORD_SIZE; \
2483             max: GENLIST_ICON_PASSWORD_SIZE GENLIST_ICON_PASSWORD_SIZE; \
2484             image.normal: "00_search_edit_field_bg_02.png"; \
2485             image.border: 12 13 12 13; \
2486             image.border_scale: 1;
2487
2488 /*****************************************************************************/
2489 /******************************* Genlist Bubble ********************************/
2490 /*****************************************************************************/
2491 #define GENLIST_IMAGES_EXPANDABLE_BTN \
2492          images { \
2493             image: "00_button_expand_closed.png" COMP; \
2494             image: "00_button_expand_opened.png" COMP; \
2495          }
2496
2497 #define GENLIST_PART_EXPANDABLE_ARROW \
2498          GENLIST_PART_ICON("touch_arrow", \
2499             ignore_flags: ON_HOLD; \
2500             GENLIST_DESCRIPTION_ENVELOP("arrow", ) \
2501          ) \
2502          GENLIST_PART_RECT("arrow_clip", \
2503             GENLIST_DESCRIPTION_ENVELOP("arrow", \
2504                color: 101 101 101 255; \
2505             ) \
2506             description { state: "disabled" 0.0; \
2507                color: 101 101 101 76; \
2508             } \
2509             description { state: "expand_opened_press" 0.0; \
2510                color: 248 246 239 255; \
2511             } \
2512             description { state: "default_press" 0.0; \
2513                color: 248 246 239 255; \
2514             } \
2515          ) \
2516          GENLIST_PART_IMAGE("arrow", \
2517             clip_to: "arrow_clip"; \
2518             ignore_flags: ON_HOLD; \
2519             mouse_events: 0; \
2520             GENLIST_DESCRIPTION_R("elm.padding.right", \
2521                fixed: 1 1; \
2522                min: 45 45; \
2523                max: 45 45; \
2524                image.normal: "00_button_expand_closed.png"; \
2525             ) \
2526             description { state: "default_press" 0.0; \
2527                inherit: "default" 0.0; \
2528                image.normal: "00_button_expand_closed_press.png"; \
2529             } \
2530             description { state: "expand_opened" 0.0; \
2531                inherit: "default" 0.0; \
2532                image.normal: "00_button_expand_opened.png"; \
2533             } \
2534             description { state: "expand_opened_press" 0.0; \
2535                inherit: "expand_opened" 0.0; \
2536                image.normal: "00_button_expand_opened_press.png"; \
2537             } \
2538          )
2539 /*****************************************************************************/
2540 /******************************* Genlist RECT ********************************/
2541 /*****************************************************************************/
2542 #define GENLIST_PART_SPACER(NAME, DESCRIPION) \
2543     part { name: NAME; \
2544       scale: 1; \
2545       mouse_events: 0; \
2546       type: SPACER; \
2547       DESCRIPION \
2548    }
2549
2550 #define GENLIST_PART_RECT(NAME, DESCRIPION) \
2551     part { name: NAME; \
2552       scale: 1; \
2553       type: RECT; \
2554       DESCRIPION \
2555    }
2556
2557 /*****************************************************************************/
2558 /******************************* Genlist TEXT ********************************/
2559 /*****************************************************************************/
2560 // FIXME: because, when naviframe item is pushed,
2561 // naviframe freeze all events so text events cannot be repeated. :-(
2562 // So all texts should have it's own sound program, not repeat to BG
2563 #define GENLIST_PART_TEXT(NAME, DESCRIPION) \
2564     part { name: NAME; \
2565       scale: 1; \
2566       type: TEXT; \
2567       DESCRIPION \
2568    }
2569
2570 #define GENLIST_PART_TEXTBLOCK(NAME, DESCRIPION) \
2571     part { name: NAME; \
2572       scale: 1; \
2573       type: TEXTBLOCK; \
2574       DESCRIPION \
2575    }
2576
2577 /*************************** parameters **********************************/
2578 #define GENLIST_PARAM_TEXT_LIMIT_RB \
2579    rel1.to_x: "base"; /* This limits text growing. */\
2580    rel1.relative: 0.35 0; /* This limits text growing. */\
2581    text.max: 1 0; /* This limits text growing. */
2582
2583 #define GENLIST_PARAM_TEXT_LIMIT_RT \
2584    rel1.to_x: "base"; /* This limits text growing. */\
2585    rel1.relative: 0.35 1; /* This limits text growing. */\
2586    text.max: 1 0; /* This limits text growing. */
2587
2588 #define GENLIST_PARAM_TEXT_LIMIT_RTB \
2589    rel1.to_x: "base"; /* This limits text growing. */\
2590    rel1.relative: 0.35 1; /* This limits text growing. */\
2591    text.max: 1 0; /* This limits text growing. */
2592
2593 // Group Title
2594 #define GENLIST_PARAM_DIALOGUE_GROUP_TITLE \
2595    color: GENLIST_DIALOGUE_GROUP_TITLE_COLOR; \
2596    text { \
2597       align: 0.0 0.5; \
2598       font: "Tizen:style=Bold"; \
2599       min: 0 1; \
2600       size: GENLIST_DIALOGUE_GROUP_TITLE_SIZE; \
2601       text_class: "list_item"; \
2602    }
2603
2604 // Password style
2605 #define GENLIST_PARAM_PASSWORD_TITLE \
2606    color: DIALOGUE_PASSWORD_TITLE_COLOR; \
2607    text { \
2608       font: "Tizen:style=Bold"; \
2609       size: DIALOGUE_PASSWORD_TITLE_SIZE; \
2610       min: 0 1; \
2611       align: 0 0.5; \
2612       text_class: "list_item"; \
2613    }
2614
2615 // Progress main text
2616 #define GENLIST_PARAM_PROGRESS_MAIN \
2617    color: GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR; \
2618    text { \
2619       align: 0 0.5; \
2620       min: 0 1; \
2621       font: "Tizen:style=Regular"; \
2622       size: GENLIST_PROGRESS_MAIN_TEXT_SIZE; \
2623       text_class: "list_item"; \
2624    }
2625
2626 // list main text
2627 #define GENLIST_PARAM_LISTITEM \
2628    color: GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR; \
2629    text { \
2630       align: 0 0.5; \
2631       min: 0 1; \
2632       font: "Tizen:style=Regular"; \
2633       size: GENLIST_LIST_MAIN_TEXT_SIZE; \
2634       text_class: "list_item"; \
2635    }
2636
2637 #define GENLIST_PARAM_LISTITEM_TB \
2638    text { \
2639       min: 0 1; \
2640       style: "genlist_style_list_main_text_unread"; \
2641    }
2642
2643 #define GENLIST_PARAM_LISTITEM_TB_WRAP \
2644    text { \
2645       min: 0 1; \
2646       style: "genlist_style_list_main_text_unread_wrap"; \
2647    }
2648
2649 // list subtext
2650 #define GENLIST_PARAM_SUBITEM_DEFAULT \
2651    color: GENLIST_LIST_SUB_TEXT_DEFAULT_COLOR; \
2652    text { \
2653       align: 0 0.5; \
2654       min: 0 1; \
2655       font: "Tizen:style=Bold"; \
2656       size: GENLIST_LIST_SUB_TEXT_SIZE; \
2657       text_class: "tizen"; \
2658    }
2659
2660 #define GENLIST_PARAM_SUBITEM_SETTINGS \
2661    color: GENLIST_LIST_SUB_TEXT_SETTINGS_COLOR; \
2662    text { \
2663       align: 0 0.5; \
2664       min: 0 1; \
2665       font: "Tizen:style=Bold"; \
2666       size: GENLIST_LIST_SUB_TEXT_SIZE; \
2667       text_class: "tizen"; \
2668    }
2669
2670 #define GENLIST_PARAM_SUBITEM_DEFAULT_TB \
2671    text { \
2672       min: 0 1; \
2673       style: "genlist_style_list_sub_text_default"; \
2674    }
2675
2676 #define GENLIST_PARAM_SUBITEM_DEFAULT_TB_WRAP \
2677    text { \
2678       min: 0 1; \
2679       style: "genlist_style_list_sub_text_default_wrap"; \
2680    }
2681
2682 #define GENLIST_PARAM_SUBITEM_SETTINGS_TB \
2683    text { \
2684       min: 0 1; \
2685       style: "genlist_style_list_sub_text_settings"; \
2686    }
2687
2688 // list subtext 02
2689 #define GENLIST_PARAM_SUBITEM_02 \
2690    color: GENLIST_LIST_SUB_TEXT_02_COLOR; \
2691    text { \
2692       align: 0 0.5; \
2693       min: 0 1; \
2694       font: "Tizen:style=Bold"; \
2695       size: GENLIST_LIST_SUB_TEXT_02_SIZE; \
2696       text_class: "tizen"; \
2697    }
2698
2699 // Dialogue group - Apps
2700 #define GENLIST_PARAM_APPS_NAME\
2701    color: GENLIST_APPS_NAME_COLOR; \
2702    text { \
2703       align: 0 0.5; \
2704       min: 0 1; \
2705       font: "Tizen:style=Bold"; \
2706       size: GENLIST_APPS_NAME_SIZE; \
2707       text_class: "list_item"; \
2708    }
2709
2710 #define GENLIST_PARAM_APPS_INC\
2711    color: GENLIST_APPS_INC_COLOR; \
2712    text { \
2713       align: 0 0.5; \
2714       min: 0 1; \
2715       font: "Tizen:style=Bold"; \
2716       size: GENLIST_APPS_INC_SIZE; \
2717       text_class: "list_item"; \
2718    }
2719
2720 #define GENLIST_PARAM_APPS_RATING\
2721    color: GENLIST_APPS_RATING_COLOR; \
2722    text { \
2723       align: 0 0.5; \
2724       min: 0 1; \
2725       font: "Tizen:style=Bold"; \
2726       size: GENLIST_APPS_RATING_SIZE; \
2727       text_class: "list_item"; \
2728    }
2729
2730 #define GENLIST_PARAM_APPS_PRICE\
2731    color: GENLIST_APPS_PRICE_ORIGINAL_COLOR; \
2732    text { \
2733       align: 0 0.5; \
2734       min: 0 1; \
2735       font: "Tizen:style=Bold"; \
2736       size: GENLIST_APPS_PRICE_SIZE; \
2737       text_class: "list_item"; \
2738    }
2739
2740 #define GENLIST_PARAM_APPS_PRICE_SALE\
2741    color: GENLIST_APPS_PRICE_SALE_COLOR; \
2742    text { \
2743       align: 0 0.5; \
2744       min: 0 1; \
2745       font: "Tizen:style=Bold"; \
2746       size: GENLIST_APPS_PRICE_SIZE; \
2747       text_class: "list_item"; \
2748    }
2749
2750 #define GENLIST_PARAM_CONTENTS_TEXT \
2751    color: GENLIST_CONTENTS_TEXT_COLOR; \
2752    text { \
2753       align: 0 0.5; \
2754       min: 0 1; \
2755       font: "Tizen:style=Regular"; \
2756       size: GENLIST_CONTENTS_TEXT_SIZE; \
2757       text_class: "tizen"; \
2758    }
2759
2760 /*************************** Descriptions **********************************/
2761 // list main text
2762 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2763    description { state: "disabled" 0.0; \
2764       inherit: "default" 0.0; \
2765       color: GENLIST_LIST_MAIN_TEXT_UNREAD_DIM_COLOR; \
2766    } \
2767    description { state: "read" 0.0; \
2768       inherit: "default" 0.0; \
2769       color: GENLIST_LIST_MAIN_TEXT_READ_COLOR; \
2770    } \
2771    description { state: "read,disabled" 0.0; \
2772       inherit: "default" 0.0; \
2773       color: GENLIST_LIST_MAIN_TEXT_READ_DIM_COLOR; \
2774    } \
2775    description { state: "selected" 0.0; \
2776       inherit: "default" 0.0; \
2777       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2778    }
2779
2780 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2781    description { state: "disabled" 0.0; \
2782       inherit: "default" 0.0; \
2783       text.style: "genlist_style_list_main_text_unread_dim"; \
2784    } \
2785    description { state: "read" 0.0; \
2786       inherit: "default" 0.0; \
2787       text.style: "genlist_style_list_main_text_read"; \
2788    } \
2789    description { state: "read,disabled" 0.0; \
2790       inherit: "default" 0.0; \
2791       text.style: "genlist_style_list_main_text_read_dim"; \
2792    } \
2793    description { state: "selected" 0.0; \
2794       inherit: "default" 0.0; \
2795       text.style: "genlist_style_list_main_text_focus"; \
2796    }
2797
2798 // list sub text
2799 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2800    description { state: "disabled" 0.0; \
2801       inherit: "default" 0.0; \
2802       color: GENLIST_LIST_SUB_TEXT_DEFAULT_DIM_COLOR; \
2803    } \
2804    description { state: "selected" 0.0; \
2805       inherit: "default" 0.0; \
2806       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2807    }
2808
2809 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
2810    description { state: "disabled" 0.0; \
2811       inherit: "default" 0.0; \
2812       text.style: "genlist_style_list_sub_text_default_dim"; \
2813    } \
2814    description { state: "selected" 0.0; \
2815       inherit: "default" 0.0; \
2816       text.style: "genlist_style_list_sub_text_focus"; \
2817    }
2818
2819 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB_WRAP \
2820    description { state: "disabled" 0.0; \
2821       inherit: "default" 0.0; \
2822       text.style: "genlist_style_list_sub_text_default_dim_wrap"; \
2823    } \
2824    description { state: "selected" 0.0; \
2825       inherit: "default" 0.0; \
2826       text.style: "genlist_style_list_sub_text_focus_wrap"; \
2827    }
2828
2829 #define GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
2830    description { state: "disabled" 0.0; \
2831       inherit: "default" 0.0; \
2832       color: GENLIST_LIST_SUB_TEXT_SETTINGS_DIM_COLOR; \
2833    } \
2834    description { state: "selected" 0.0; \
2835       inherit: "default" 0.0; \
2836       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2837    }
2838
2839 #define GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS_TB \
2840    description { state: "disabled" 0.0; \
2841       inherit: "default" 0.0; \
2842       text.style: "genlist_style_list_sub_text_settings_dim"; \
2843    } \
2844    description { state: "selected" 0.0; \
2845       inherit: "default" 0.0; \
2846       text.style: "genlist_style_list_sub_text_focus"; \
2847    }
2848
2849 // list main text multiline
2850 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB_WRAP \
2851    description { state: "disabled" 0.0; \
2852       inherit: "default" 0.0; \
2853       text.style: "genlist_style_list_main_text_unread_dim_wrap"; \
2854    } \
2855    description { state: "selected" 0.0; \
2856       inherit: "default" 0.0; \
2857       text.style: "genlist_style_list_main_text_focus_wrap"; \
2858    }
2859
2860 /*************************** Parts **********************************/
2861 #define GENLIST_PART_DIALOGUE_GROUP_HELP_TEXT(NAME, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2862    GENLIST_PART_TEXTBLOCK(NAME, \
2863       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2864          text { \
2865             min: 0 1; \
2866             style: "genlist_style_dialogue_group_help_text"; \
2867          } \
2868          PARAM) \
2869    )
2870
2871 #define GENLIST_PART_LISTITEM(NAME, DESCRIPTION) \
2872    GENLIST_PART_TEXT(NAME, \
2873       DESCRIPTION \
2874       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2875    )
2876
2877 #define GENLIST_PART_LISTITEM_TB(NAME, DESCRIPTION) \
2878    GENLIST_PART_TEXTBLOCK(NAME, \
2879       DESCRIPTION \
2880       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2881    )
2882
2883 #define GENLIST_PART_LISTITEM_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2884    GENLIST_PART_TEXT(NAME, \
2885       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2886          min: 0 HEIGHT; \
2887          GENLIST_PARAM_LISTITEM \
2888          PARAM \
2889       ) \
2890       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2891    )
2892
2893 #define GENLIST_PART_LISTITEM_TB_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2894    GENLIST_PART_TEXTBLOCK(NAME, \
2895       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2896          min: 0 HEIGHT; \
2897          fixed: 1 0; \
2898          GENLIST_PARAM_LISTITEM_TB \
2899          PARAM \
2900       ) \
2901       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2902    )
2903
2904 #define GENLIST_PART_LISTITEM_LR(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
2905    GENLIST_PART_TEXT(NAME, \
2906       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
2907          min: 0 HEIGHT; \
2908          GENLIST_PARAM_LISTITEM \
2909          PARAM \
2910       ) \
2911       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2912    )
2913
2914 #define GENLIST_PART_LISTITEM_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP, PARAM) \
2915    GENLIST_PART_TEXT(NAME, \
2916       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
2917          min: 0 HEIGHT; \
2918          fixed: 0 1; \
2919          GENLIST_PARAM_LISTITEM \
2920          PARAM \
2921       ) \
2922       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2923    )
2924
2925 #define GENLIST_PART_LISTITEM_LRT_TB(NAME, HEIGHT, LEFT, RIGHT, TOP, PARAM) \
2926    GENLIST_PART_TEXTBLOCK(NAME, \
2927       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
2928          min: 0 HEIGHT; \
2929          fixed: 0 1; \
2930          GENLIST_PARAM_LISTITEM_TB \
2931          PARAM \
2932       ) \
2933       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2934    )
2935
2936 #define GENLIST_PART_LISTITEM_LR_TB(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
2937    GENLIST_PART_TEXTBLOCK(NAME, \
2938       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
2939          min: 0 HEIGHT; \
2940          fixed: 1 0; \
2941          GENLIST_PARAM_LISTITEM_TB \
2942          PARAM \
2943       ) \
2944       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2945    )
2946
2947 #define GENLIST_PART_SUBITEM_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2948    GENLIST_PART_TEXT(NAME, \
2949       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2950          min: 0 HEIGHT; \
2951          GENLIST_PARAM_SUBITEM_DEFAULT \
2952          PARAM \
2953       ) \
2954       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2955    )
2956
2957 #define GENLIST_PART_SUBITEM(NAME, DESCRIPTION) \
2958    GENLIST_PART_TEXT(NAME, \
2959       DESCRIPTION \
2960       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2961    )
2962
2963 #define GENLIST_PART_SUBITEM_R(NAME, HEIGHT, RIGHT) \
2964    GENLIST_PART_TEXT(NAME, \
2965       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2966          min: 0 HEIGHT; \
2967          fixed: 1 0; \
2968          GENLIST_PARAM_TEXT_LIMIT_RB \
2969          GENLIST_PARAM_SUBITEM_DEFAULT \
2970       ) \
2971       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2972    )
2973
2974 #define GENLIST_PART_SUBITEM_RB(NAME, HEIGHT, RIGHT, BOTTOM) \
2975    GENLIST_PART_TEXT(NAME, \
2976       GENLIST_DESCRIPTION_RB(RIGHT, BOTTOM, \
2977          min: 0 HEIGHT; \
2978          fixed: 1 1; \
2979          GENLIST_PARAM_TEXT_LIMIT_RB \
2980          GENLIST_PARAM_SUBITEM_DEFAULT \
2981       ) \
2982       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2983    )
2984
2985 #define GENLIST_PART_SUBITEM_RB_TB(NAME, HEIGHT, RIGHT, BOTTOM) \
2986    GENLIST_PART_TEXTBLOCK(NAME, \
2987       GENLIST_DESCRIPTION_RB(RIGHT, BOTTOM, \
2988          min: 0 HEIGHT; \
2989          GENLIST_PARAM_TEXT_LIMIT_RB \
2990          fixed: 1 1; \
2991          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
2992       ) \
2993       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
2994    )
2995
2996 #define GENLIST_PART_SUBITEM_TB_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM) \
2997    GENLIST_PART_TEXTBLOCK(NAME, \
2998       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2999          min: 0 HEIGHT; \
3000          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3001       ) \
3002       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3003    )
3004
3005 #define GENLIST_PART_SUBITEM_R_FIXED(NAME, WIDTH, HEIGHT, RIGHT) \
3006    GENLIST_PART_TEXT(NAME, \
3007       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
3008          min: WIDTH HEIGHT; \
3009          fixed: 1 1; \
3010          GENLIST_PARAM_SUBITEM_DEFAULT \
3011       ) \
3012       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3013    )
3014
3015 #define GENLIST_PART_SUBITEM_R_FIXED_TB(NAME, WIDTH, HEIGHT, RIGHT) \
3016    GENLIST_PART_TEXTBLOCK(NAME, \
3017        GENLIST_DESCRIPTION_R(RIGHT, \
3018          min: WIDTH HEIGHT; \
3019          fixed: 1 0; \
3020          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3021       ) \
3022       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3023    )
3024
3025 #define GENLIST_PART_SUBITEM_L_FIXED(NAME, WIDTH, HEIGHT, LEFT) \
3026    GENLIST_PART_TEXT(NAME, \
3027       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
3028          min: WIDTH HEIGHT; \
3029          fixed: 1 1; \
3030          GENLIST_PARAM_SUBITEM_DEFAULT \
3031       ) \
3032       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3033    )
3034
3035 #define GENLIST_PART_SUBITEM_LR(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
3036    GENLIST_PART_TEXT(NAME, \
3037       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
3038          min: 0 HEIGHT; \
3039          GENLIST_PARAM_SUBITEM_DEFAULT \
3040          PARAM \
3041       ) \
3042       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3043    )
3044
3045 #define GENLIST_PART_SUBITEM_LR_TB(NAME, HEIGHT, LEFT, RIGHT) \
3046    GENLIST_PART_TEXTBLOCK(NAME, \
3047       GENLIST_DESCRIPTION_LR(LEFT, RIGHT, \
3048          min: 0 HEIGHT; \
3049          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3050       ) \
3051       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3052    )
3053
3054 #define GENLIST_PART_SUBITEM_LB(NAME, HEIGHT, LEFT, RIGHT) \
3055    GENLIST_PART_TEXT(NAME, \
3056       GENLIST_DESCRIPTION_LB(LEFT, BOTTOM, \
3057          min: 0 HEIGHT; \
3058          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3059       ) \
3060       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3061    )
3062
3063 #define GENLIST_PART_SUBITEM_LRB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3064    GENLIST_PART_TEXT(NAME, \
3065       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3066          min: 0 HEIGHT; \
3067          GENLIST_PARAM_SUBITEM_DEFAULT \
3068          fixed: 0 1; \
3069       ) \
3070       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3071    )
3072
3073 #define GENLIST_PART_SUBITEM_SETTINGS_LRB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM, PARAM) \
3074    GENLIST_PART_TEXT(NAME, \
3075       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3076          min: 0 HEIGHT; \
3077          fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
3078          GENLIST_PARAM_SUBITEM_SETTINGS\
3079          PARAM; \
3080       ) \
3081       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
3082    )
3083
3084 #define GENLIST_PART_SUBITEM_LRB_TB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3085    GENLIST_PART_TEXTBLOCK(NAME, \
3086       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3087          min: 0 HEIGHT; \
3088          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3089          fixed: 0 1; \
3090       ) \
3091       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3092    )
3093
3094 #define GENLIST_PART_SUBITEM_SETTINGS_LRB_TB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3095    GENLIST_PART_TEXTBLOCK(NAME, \
3096       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3097          min: 0 HEIGHT; \
3098          GENLIST_PARAM_SUBITEM_SETTINGS_TB \
3099          fixed: 0 1; \
3100       ) \
3101       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS_TB \
3102    )
3103
3104 #define GENLIST_PART_SUBITEM_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP) \
3105    GENLIST_PART_TEXT(NAME, \
3106       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
3107          min: 0 HEIGHT; \
3108          fixed: 0 1; \
3109          GENLIST_PARAM_SUBITEM_DEFAULT \
3110       ) \
3111       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3112    )
3113
3114 #define GENLIST_PART_SUBITEM_SETTINGS_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP) \
3115    GENLIST_PART_TEXT(NAME, \
3116       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
3117          min: 0 HEIGHT; \
3118          fixed: 0 1; \
3119          GENLIST_PARAM_SUBITEM_SETTINGS \
3120       ) \
3121       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
3122    )
3123
3124 #define GENLIST_PART_SUBITEM_LTB(NAME, HEIGHT, LEFT, TOP, BOTTOM) \
3125    GENLIST_PART_TEXT(NAME, \
3126       GENLIST_DESCRIPTION_LTB(LEFT, TOP, BOTTOM, \
3127          min: 0 HEIGHT; \
3128          fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
3129          GENLIST_PARAM_SUBITEM_DEFAULT \
3130       ) \
3131       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3132    )
3133
3134 #define GENLIST_PART_SUBITEM_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3135    GENLIST_PART_TEXT(NAME, \
3136       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3137          min: 0 HEIGHT; \
3138          GENLIST_PARAM_TEXT_LIMIT_RT \
3139          GENLIST_PARAM_SUBITEM_DEFAULT \
3140          fixed: 1 0; \
3141       ) \
3142       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3143    )
3144
3145 #define GENLIST_PART_SUBITEM_RTB_TB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3146    GENLIST_PART_TEXTBLOCK(NAME, \
3147       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3148          min: 0 HEIGHT; \
3149          GENLIST_PARAM_TEXT_LIMIT_RT \
3150          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3151          fixed: 1 0; \
3152       ) \
3153       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3154    )
3155
3156 #define GENLIST_PART_SUBITEM_02_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3157    GENLIST_PART_TEXT(NAME, \
3158       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3159          min: 0 HEIGHT; \
3160          GENLIST_PARAM_TEXT_LIMIT_RT \
3161          GENLIST_PARAM_SUBITEM_02 \
3162          fixed: 1 0; \
3163       ) \
3164       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3165    )
3166
3167 #define GENLIST_PARAM_LIST_BUBBLE_TEXT \
3168    color: GENLIST_LIST_BUBBLE_TEXT_COLOR; \
3169    text { \
3170       align: 1 0.5; \
3171       min: 0 1; \
3172       font: "Tizen:style=Bold"; \
3173       size: GENLIST_LIST_BUBBLE_TEXT_SIZE; \
3174       text_class: "tizen"; \
3175    }
3176
3177 // FIXME: Need to find why rel2.offset: 9 -1 will not fix the alignment of bubble text ?
3178 #define GENLIST_PART_LIST_BUBBLE_TEXT_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3179          GENLIST_PART_IMAGE("elm.bubble", \
3180             mouse_events: 0; \
3181             GENLIST_DESCRIPTION_ENVELOP(NAME, \
3182                image { \
3183                   normal: "00_list_bubble_bg.png"; \
3184                   border: 8 8 0 0; \
3185                } \
3186                rel1.offset: -10 0; \
3187                rel2.offset: 8 -1; \
3188                min: 48 38; \
3189                max: -1 38; \
3190                fixed: 0 1; \
3191                color: GENLIST_LIST_BUBBLE_COLOR; \
3192             ) \
3193             description { state: "selected" 0.0; \
3194                inherit: "default" 0.0; \
3195                color: GENLIST_LIST_BUBBLE_PRESS_COLOR; \
3196             } \
3197          ) \
3198          GENLIST_PART_TEXT(NAME, \
3199             GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3200                min: 0 HEIGHT; \
3201                GENLIST_PARAM_TEXT_LIMIT_RT \
3202                rel2.offset: -10 -1; /* This maintain the text alignment with bubble text. */\
3203                GENLIST_PARAM_LIST_BUBBLE_TEXT \
3204             ) \
3205             description { state: "selected" 0.0; \
3206                inherit: "default" 0.0; \
3207                color: GENLIST_LIST_BUBBLE_TEXT_FOCUS_COLOR; \
3208             } \
3209          )
3210
3211 #if 0
3212 #define GENLIST_PART_BASE__( param_item_height ) \
3213          part { name: "base"; \
3214             type: RECT; \
3215             repeat_events: 1; \
3216             scale: 1; \
3217             description { state: "default" 0.0; \
3218                min: 0 param_item_height; \
3219                color: LAYOUT_GROUP_LIST_BG_COLOR_INC; \
3220             } \
3221          }
3222
3223 /******************************************************************************/
3224 /** ETC
3225 /******************************************************************************/
3226 // FIXME: UX do not define selected state. But I thinkt that it is neededs :(
3227
3228 #define GENLIST_PROOGRAM_EXPAND(SRC, TARGET) \
3229    program { \
3230       name: "expand"; \
3231       signal: "mouse,clicked,1"; \
3232       source: SRC; \
3233       action: SIGNAL_EMIT "elm,action,expand,toggle" "elm"; \
3234    } \
3235    program { \
3236       name: "go_expanded"; \
3237       signal: "elm,state,expanded"; \
3238       source: "elm"; \
3239       action: STATE_SET "active" 0.0; \
3240       TARGET \
3241    } \
3242    program { \
3243       name: "go_contracted"; \
3244       signal: "elm,state,contracted"; \
3245       source: "elm"; \
3246       action: STATE_SET "default" 0.0; \
3247       TARGET \
3248    }
3249
3250 #define GENLIST_PART_BASE_LIST_H( HEIGHT) \
3251          part { name: "base"; \
3252             type: RECT; \
3253             repeat_events: 1; \
3254             scale: 1; \
3255             description { state: "default" 0.0; \
3256                align: 0.5 0.5; \
3257                color: 0 0 0 0; \
3258                rel2.relative: 1 0; \
3259                rel2.to: "bottom_line"; \
3260                min: 0 HEIGHT; \
3261             } \
3262          } \
3263          GENLIST_PART_BOTTOM_LINE
3264
3265 #define GENLIST_PART_DIALOGUE_ITEM \
3266          part { name: "elm.rect.dialogue"; \
3267             type: RECT; \
3268             scale: 1; \
3269             description { state: "default" 0.0; \
3270                min: 10 0; \
3271                fixed: 1 0; \
3272                color: GENLIST_DIALOGUE_GROUP_LEFT_BG_COLOR_INC; \
3273                rel2.relative: 0.0 1.0; \
3274                align: 0.0 0.0; \
3275             } \
3276          }
3277
3278 #define GENLIST_PART_DIALOGUE_RIGHT_LINE \
3279          part { name: "elm.rect.dialogue.right.line"; \
3280             type: RECT; \
3281             scale: 1; \
3282             description { state: "default" 0.0; \
3283                min: 1 0; \
3284                fixed: 1 0; \
3285                rel1 { \
3286                   relative: 1.0  0.0; \
3287                   offset: -1 0; \
3288                } \
3289                align: 1.0 0.0; \
3290                color: GENLIST_LIST_LINE1_COLOR; \
3291             } \
3292          }
3293
3294 #define GENLIST_PROGRAM_FLIP_1TEXT \
3295          program { name: "flipped"; \
3296             signal: "elm,state,flip,enabled"; \
3297             source: "elm"; \
3298             action: STATE_SET "flipped" 0.0; \
3299             target: "elm.text"; \
3300             target: "elm.flip.content"; \
3301          } \
3302          program { name: "flip_disabled"; \
3303             signal: "elm,state,flip,disabled"; \
3304             source: "elm"; \
3305             action: STATE_SET "default" 0.0; \
3306             target: "elm.text"; \
3307             target: "elm.flip.content"; \
3308          }
3309
3310 #define GENLIST_PROGRAM_FLIP_2TEXT \
3311          program { name: "flipped"; \
3312             signal: "elm,state,flip,enabled"; \
3313             source: "elm"; \
3314             action: STATE_SET "flipped" 0.0; \
3315             target: "elm.text.1"; \
3316             target: "elm.text.2"; \
3317             target: "elm.flip.content"; \
3318          } \
3319          program { name: "flip_disabled"; \
3320             signal: "elm,state,flip,disabled"; \
3321             source: "elm"; \
3322             action: STATE_SET "default" 0.0; \
3323             target: "elm.text.1"; \
3324             target: "elm.text.2"; \
3325             target: "elm.flip.content"; \
3326          }
3327
3328 #define GENLIST_PROGRAM_FLIP_2TEXT_1ICON \
3329          program { name: "flipped"; \
3330             signal: "elm,state,flip,enabled"; \
3331             source: "elm"; \
3332             action: STATE_SET "flipped" 0.0; \
3333             target: "elm.text.1"; \
3334             target: "elm.text.2"; \
3335             target: "elm.icon"; \
3336             target: "elm.flip.content"; \
3337          } \
3338          program { name: "flip_disabled"; \
3339             signal: "elm,state,flip,disabled"; \
3340             source: "elm"; \
3341             action: STATE_SET "default" 0.0; \
3342             target: "elm.text.1"; \
3343             target: "elm.text.2"; \
3344             target: "elm.icon"; \
3345             target: "elm.flip.content"; \
3346          }
3347
3348 #define GENLIST_PROGRAM_FLIP_2TEXT_2ICON \
3349          program { name: "flipped"; \
3350             signal: "elm,state,flip,enabled"; \
3351             source: "elm"; \
3352             action: STATE_SET "flipped" 0.0; \
3353             target: "elm.text.1"; \
3354             target: "elm.text.2"; \
3355             target: "elm.icon.1"; \
3356             target: "elm.icon.2"; \
3357             target: "elm.flip.content"; \
3358          } \
3359          program { name: "flip_disabled"; \
3360             signal: "elm,state,flip,disabled"; \
3361             source: "elm"; \
3362             action: STATE_SET "default" 0.0; \
3363              target: "elm.text.1"; \
3364             target: "elm.text.2"; \
3365             target: "elm.icon.1"; \
3366             target: "elm.icon.2"; \
3367             target: "elm.flip.content"; \
3368          }
3369
3370 #define GENLIST_PROGRAM_FLIP_3TEXT_2ICON \
3371          program { name: "flipped"; \
3372             signal: "elm,state,flip,enabled"; \
3373             source: "elm"; \
3374             action: STATE_SET "flipped" 0.0; \
3375             target: "elm.text.1"; \
3376             target: "elm.text.2"; \
3377             target: "elm.text.3"; \
3378             target: "elm.icon.1"; \
3379             target: "elm.icon.2"; \
3380             target: "elm.flip.content"; \
3381          } \
3382          program { name: "flip_disabled"; \
3383             signal: "elm,state,flip,disabled"; \
3384             source: "elm"; \
3385             action: STATE_SET "default" 0.0; \
3386             target: "elm.text.1"; \
3387             target: "elm.text.2"; \
3388             target: "elm.text.3"; \
3389             target: "elm.icon.1"; \
3390             target: "elm.icon.2"; \
3391             target: "elm.flip.content"; \
3392          }
3393
3394
3395 #define GENLIST_DESCRIPTION_INVISIBLE_SELECTED \
3396             description { state: "selected" 1.0; \
3397                inherit: "default" 0.0; \
3398                visible: 0; \
3399             }
3400
3401 #define GENLIST_DESCRIPTION_FLIP_ENABLED \
3402             description { state: "flipped" 0.0; \
3403                inherit: "default" 0.0; \
3404                visible: 0; \
3405             }
3406
3407 #define GENLIST_PROGRAM_SCRIPT_FLIP_SELECT_1TEXT \
3408             script { \
3409                new st[31]; \
3410                new Float:vl; \
3411                get_state(PART:"elm.text", st, 30, vl); \
3412                set_state(PART:"bg", "selected", 0.0); \
3413                if (!strcmp(st, "flipped")) \
3414                   set_state(PART:"elm.text", "selected", 1.0); \
3415                else \
3416                   set_state(PART:"elm.text", "selected", 0.0); \
3417             }
3418
3419
3420 /* genlist multisense macro - start */
3421 #define GENLIST_PROGRAM_AFTER_PLAY_BUTTON_PRESS \
3422             after: "play_button_press";
3423
3424 #define GENLIST_PROGRAM_PLAY_BUTTON_PRESS \
3425          program { name: "play_button_press"; \
3426             action: PLAY_SAMPLE "button-pressed" 1.0; \
3427          }
3428 #endif