email.list email.outbox genlist changes to support unread email messages
[platform/core/uifw/efl-theme-tizen.git] / themes / widgets / genlist / genlist_macro.edc
1 /*
2  * efl-theme-tizen
3  * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an AS IS BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18 /* genlist multisense sample/tone listing */
19    sounds {
20       sample {
21          name: "button-pressed" RAW;
22          source: "button-pressed.wav";
23       }
24    }
25
26 //****************************************************************************//
27 // *******************************  Default size macro **********************//
28 //**************************************************************************//
29 // if size is different for each theme, split it into each theme inc.
30
31 #define GENLIST_HEIGHT_1LINE              110  // (114 - top/bottom padding)
32 #define GENLIST_HEIGHT_2LINE_MAIN         54
33 #define GENLIST_HEIGHT_2LINE_SUB          42
34 #define GENLIST_HEIGHT_MULTILINE_SUB      38
35 #define GENLIST_PART_LIST_LINE_HEIGHT     1
36 #define GENLIST_HEIGHT_GROUPTITLE         46
37
38 #define GENLIST_PADDING_SIZE_DEFAULT            16
39 #define GENLIST_PADDING_SIZE_LEFT               26
40 #define GENLIST_PADDING_SIZE_RIGHT              26
41 // Dialogue group image has bottom padding (2piexl), Giant font can overlapped bottom line of image.
42 #define GENLIST_PADDING_SIZE_TOP                2
43 #define GENLIST_PADDING_SIZE_BOTTOM             2
44 // -----------------------------------------------------
45 #define GENLIST_PADDING_SIZE_TOP_2LINE          22
46 #define GENLIST_PADDING_SIZE_BOTTOM_2LINE       22
47 #define GENLIST_PADDING_SIZE_TOP_3LINE          17
48 #define GENLIST_PADDING_SIZE_BOTTOM_3LINE       17
49 #define GENLIST_PADDING_SIZE_NDEPTH             26
50
51 #define DIALOGUE_PADDING_SCROLLER         16
52 #define DIALOGUE_PADDING_SIZE_LEFT        16+20
53 #define DIALOGUE_PADDING_SIZE_RIGHT       16+20
54
55 #define GENLIST_ICON_SMALL_SIZE           45
56 #define GENLIST_ICON_STAR_SIZE            45
57 #define GENLIST_ICON_MEDIUM_SIZE          72
58 #define GENLIST_ICON_LARGE_SIZE           99
59
60 #define GENLIST_ICON_MEDIUM_MASK_SIZE     84
61 #define GENLIST_ICON_LARGE_MASK_SIZE      108
62
63 #define GENLIST_BTN_01_HEIGHT             74
64 #define GENLIST_BTN_02_SIZE               72
65 #define GENLIST_ICON_ONOFF_WIDTH          132
66 #define GENLIST_ICON_ONOFF_HEIGHT         70
67 #define GENLIST_ICON_CHECK_RADIO_SIZE     64
68 #define GENLIST_ICON_COLORBAR_SIZE        7
69 #define GENLIST_ICON_PASSWORD_SIZE        82
70
71 #define GENLIST_ICON_ENTRY_SIZE           54
72
73 #define GENLIST_TREESIZE_DEFAULT          26
74
75 //#define GENLIST_DIALOGUE_SEPARATOR_DEFAULT_HEIGHT 40
76
77 //****************************************************************************//
78 // *****************  EDJE description have 24 patterns **********************//
79  //**************************************************************************//
80 // ------------------
81 // |  PART == HERE  |
82 // ------------------
83  #define GENLIST_DESCRIPTION_ENVELOP( PART, PARAM ) \
84       description { state: "default" 0.0;\
85          rel1 { \
86             relative: 0 0; \
87             to: PART; \
88          }\
89          rel2 {\
90             relative: 1 1;\
91             to: PART; \
92          }\
93          PARAM\
94       }
95
96 //      |   top  |
97 // ---------------------
98 // left |  HERE  | right
99 // ---------------------
100 //      | bottom |
101 #define GENLIST_DESCRIPTION( left, right, top, bottom, param ) \
102       description { state: "default" 0.0;\
103          rel1 { \
104             relative: 1 1; \
105             to_x: left; \
106             to_y: top; \
107          }\
108          rel2 {\
109             relative: 0 0;\
110             to_x: right;\
111             to_y: bottom;\
112          }\
113          param\
114       }
115
116 // ---------------------
117 // left |--> HERE
118 // ---------------------
119 #define GENLIST_DESCRIPTION_L( left, param ) \
120       description { state: "default" 0.0;\
121          align: 0 0.5; \
122          fixed: 1 0; \
123          rel1 { \
124             relative: 1 0; \
125             to_x: left; \
126             to_y: "base"; \
127          }\
128          rel2 { \
129             relative: 1 1;\
130             to_x: left; \
131             to_y: "base"; \
132          }\
133          param\
134       }
135
136 // ---------------------
137 //   HERE  <--| right
138 // ---------------------
139 #define GENLIST_DESCRIPTION_R( right, param ) \
140       description { state: "default" 0.0;\
141          align: 1 0.5; \
142          fixed: 1 0; \
143          rel1 { \
144             relative: 0 0; \
145             to_x: right; \
146             to_y: "base"; \
147          }\
148          rel2 {\
149             relative: 0 1;\
150             to_x: right; \
151             to_y: "base"; \
152          }\
153          param\
154       }
155
156 // --------------------------
157 // left |--> HERE  <--| right
158 // --------------------------
159 #define GENLIST_DESCRIPTION_LR( left, right, param ) \
160       description { state: "default" 0.0;\
161          rel1 { \
162             relative: 1 0; \
163             to_x: left; \
164             to_y: "base"; \
165          }\
166          rel2 {\
167             relative: 0 1;\
168             to_x: right;\
169             to_y: "base"; \
170          }\
171          param\
172       }
173
174 //   |  top     |
175 // -----------------
176 //  |  HERE  <--| right
177 // -----------------
178 //  | bottom   |
179 #define GENLIST_DESCRIPTION_RTB( right, top, bottom, param ) \
180       description { state: "default" 0.0;\
181          align: 1 0.5;\
182          rel1 { \
183             relative: 0 1; \
184             to_x: right; \
185             to_y: top; \
186          }\
187          rel2 {\
188             relative: 0 0;\
189             to_x: right;\
190             to_y: bottom;\
191          }\
192          param\
193       }
194
195 // left |  HERE  | right
196 // ---------------------
197 //      | bottom |
198 #define GENLIST_DESCRIPTION_LRB( left, right, bottom, param ) \
199       description { state: "default" 0.0;\
200          align: 0.5 1;\
201          rel1 { \
202             relative: 1 0; \
203             to_x: left; \
204             to_y: bottom; \
205          }\
206          rel2 {\
207             relative: 0 0;\
208             to_x: right;\
209             to_y: bottom;\
210          }\
211          param\
212       }
213
214 //      |   top  |
215 // ---------------------
216 // left |  HERE  | right
217 #define GENLIST_DESCRIPTION_LRT( left, right, top, param ) \
218       description { state: "default" 0.0;\
219          align: 0.5 0;\
220          rel1 { \
221             relative: 1 1; \
222             to_x: left; \
223             to_y: top; \
224          }\
225          rel2 {\
226             relative: 0 1;\
227             to_x: right;\
228             to_y: top;\
229          }\
230          param\
231       }
232
233 //      |       top  |
234 // ---------------------
235 // left | -->  HERE  |
236 #define GENLIST_DESCRIPTION_LT( left, top, param ) \
237       description { state: "default" 0.0;\
238          align: 0 0;\
239          rel1 { \
240             relative: 1 1; \
241             to_x: left; \
242             to_y: top; \
243          }\
244          rel2 {\
245             relative: 1 1;\
246             to_x: left;\
247             to_y: top;\
248          }\
249          param\
250       }
251
252 // left |  --> HERE  |
253 // ---------------------
254 //      |     bottom |
255 #define GENLIST_DESCRIPTION_LB( left, bottom, param ) \
256       description { state: "default" 0.0;\
257          align: 0 1;\
258          rel1 { \
259             relative: 1 0; \
260             to_x: left; \
261             to_y: bottom; \
262          }\
263          rel2 {\
264             relative: 1 0;\
265             to_x: left;\
266             to_y: bottom;\
267          }\
268          param\
269       }
270
271 //      |     top  |
272 // ---------------------
273 // left |--> HERE  |
274 // ---------------------
275 //      |   bottom |
276 #define GENLIST_DESCRIPTION_LTB( left, top, bottom, param ) \
277       description { state: "default" 0.0;\
278          align: 0 0.5;\
279          rel1 { \
280             relative: 1 1; \
281             to_x: left; \
282             to_y: top; \
283          }\
284          rel2 {\
285             relative: 1 0;\
286             to_x: left;\
287             to_y: bottom;\
288          }\
289          param\
290       }
291
292 //      |   top  |
293 // ---------------------
294 //     |  HERE <--| right
295 #define GENLIST_DESCRIPTION_RT( right, top, param ) \
296       description { state: "default" 0.0;\
297          align: 1 0;\
298          rel1 { \
299             relative: 0 1; \
300             to_x: right; \
301             to_y: top; \
302          }\
303          rel2 {\
304             relative: 0 1;\
305             to_x: right;\
306             to_y: top;\
307          }\
308          param\
309       }
310
311 //  | HERE <-- | right
312 // ---------------------
313 //  |  bottom  |
314 #define GENLIST_DESCRIPTION_RB( right, bottom, param ) \
315       description { state: "default" 0.0;\
316          align: 1 1;\
317          rel1 { \
318             relative: 0 0; \
319             to_x: right; \
320             to_y: bottom; \
321          }\
322          rel2 {\
323             relative: 0 0;\
324             to_x: right;\
325             to_y: bottom;\
326          }\
327          param\
328       }
329
330 // |   top  |
331 // ----------
332 // |  HERE  |
333 // ----------
334 // | bottom |
335 #define GENLIST_DESCRIPTION_TB( top, bottom, param ) \
336       description { state: "default" 0.0;\
337          align: 0.5 0.5;\
338          rel1 { \
339             relative: 0 1; \
340             to_y: top; \
341          }\
342          rel2 {\
343             relative: 1 0;\
344             to_y: bottom;\
345          }\
346          param\
347       }
348
349 #define GENLIST_PROLOG \
350       data.item: "stacking" "above"; \
351       data.item: "selectraise" "on"; \
352       data.item: "treesize" 0;
353
354 #define GENLIST_PROLOG_NORMAL \
355       GENLIST_PROLOG \
356       data.item: "treesize" GENLIST_TREESIZE_DEFAULT; \
357       data.item: "flips" "elm.flip.icon elm.flip.content elm.flip.eraser"; \
358       images { \
359          image : "00_list_group_bg.png" COMP; \
360          image : "00_list_group_bg_press.png" COMP; \
361       }
362
363 #define GENLIST_PROLOG_DIALOGUE \
364       GENLIST_PROLOG \
365       data.item: "flips" "elm.flip.icon elm.flip.content elm.flip.eraser"; \
366       images { \
367          image : "00_list_group_bg.png" COMP; \
368          image : "00_list_group_bg_press.png" COMP; \
369          image : "00_list_group_bg_top.png" COMP; \
370          image : "00_list_group_bg_top_press.png" COMP; \
371          image : "00_list_group_bg_center.png" COMP; \
372          image : "00_list_group_bg_center_press.png" COMP; \
373          image : "00_list_group_bg_bottom.png" COMP; \
374          image : "00_list_group_bg_bottom_press.png" COMP; \
375          image : "00_list_group_bg_top_focus.png" COMP; \
376          image : "00_list_group_bg_center_focus.png" COMP; \
377          image : "00_list_group_bg_bottom_focus.png" COMP; \
378       }
379
380 #define GENLIST_NAME(NAME) \
381       name: "elm/genlist/item/"NAME; \
382       alias: "elm/genlist/item_odd/"NAME; \
383       alias: "elm/genlist/item_compress/"NAME; \
384       alias: "elm/genlist/item_compress_odd/"NAME; \
385       alias: "elm/genlist/tree/"NAME; \
386       alias: "elm/genlist/tree_odd/"NAME; \
387       alias: "elm/genlist/tree_compress/"NAME; \
388       alias: "elm/genlist/tree_compress_odd/"NAME; \
389
390 /*****************************************************************************/
391 /******************************* Dialogue group ******************************/
392 /*****************************************************************************/
393 #define GENLIST_DIALOGUE_INHERIT_BODY( _PARTS ) \
394       data.item: "treesize" 0; \
395       parts { \
396          GENLIST_PART_BG_NORMAL_OFF \
397          GENLIST_PART_BOTTOM_LINE_OFF \
398          GENLIST_PART_BG_DIALOGUE \
399          GENLIST_PART_PADDING_LEFT_SIZE( DIALOGUE_PADDING_SIZE_LEFT ) \
400          GENLIST_PART_PADDING_RIGHT_EDIT \
401          _PARTS \
402          GENLIST_PART_FLIP \
403          GENLIST_PART_FOCUS_DIALOGUE \
404       }
405
406 #define GENLIST_INHERIT_THUMB_CIRCLE(SIZE_PREFIX, MASK_SIZE, PARENT) \
407      images { \
408          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_circle_icon_bg_normal.png" COMP; \
409          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_circle_icon_bg_press.png" COMP; \
410          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png" COMP; \
411          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png" COMP; \
412       } \
413       parts { \
414          GENLIST_PART_RECT("elm.thumb.clip", \
415             description { state: "default";  \
416             } \
417             description { state: "flipped";  \
418                color: 0 0 0 0; \
419             } \
420          ) \
421          GENLIST_PART_IMAGE("elm.thumb", \
422             clip_to: "elm.thumb.clip"; \
423             mouse_events: 0; \
424             GENLIST_DESCRIPTION_ENVELOP(PARENT, \
425                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_circle_icon_bg_normal.png"; \
426                min: MASK_SIZE MASK_SIZE; \
427                max: MASK_SIZE MASK_SIZE; \
428                fixed:1 1; \
429             ) \
430             description { state: "selected" 0.0; \
431                inherit: "default" 0.0; \
432                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_circle_icon_bg_press.png"; \
433             } \
434             description { state: "reorder" 0.0; \
435                inherit: "default" 0.0; \
436                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png"; \
437             } \
438             description { state: "reorder_selected" 0.0; \
439                inherit: "default" 0.0; \
440                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png"; \
441             } \
442             description { state: "decorate" 0.0; \
443                inherit: "default" 0.0; \
444             } \
445             description { state: "decorate_reorder" 0.0; \
446                inherit: "reorder" 0.0; \
447             } \
448          ) \
449          GENLIST_PART_FLIP \
450       }
451
452 #define GENLIST_INHERIT_THUMB_SQUARE(SIZE_PREFIX, MASK_SIZE, PARENT) \
453       images { \
454          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_square_icon_bg_normal.png" COMP; \
455          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_square_icon_bg_press.png" COMP; \
456          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png" COMP; \
457          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png" COMP; \
458       } \
459       parts { \
460          GENLIST_PART_RECT("elm.thumb.clip", \
461             description { state: "default";  \
462             } \
463             description { state: "flipped";  \
464                color: 0 0 0 0; \
465             } \
466          ) \
467          GENLIST_PART_IMAGE("elm.thumb", \
468             clip_to: "elm.thumb.clip"; \
469             mouse_events: 0; \
470             GENLIST_DESCRIPTION_ENVELOP(PARENT, \
471                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_square_icon_bg_normal.png"; \
472                min: MASK_SIZE MASK_SIZE; \
473                max: MASK_SIZE MASK_SIZE; \
474                fixed:1 1; \
475             ) \
476             description { state: "selected" 0.0; \
477                inherit: "default" 0.0; \
478                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_list_square_icon_bg_press.png"; \
479             } \
480             description { state: "reorder" 0.0; \
481                inherit: "default" 0.0; \
482                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png"; \
483             } \
484             description { state: "reorder_selected" 0.0; \
485                inherit: "default" 0.0; \
486                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png"; \
487             } \
488             description { state: "decorate" 0.0; \
489                inherit: "default" 0.0; \
490             } \
491             description { state: "decorate_reorder" 0.0; \
492                inherit: "reorder" 0.0; \
493             } \
494          ) \
495          GENLIST_PART_FLIP \
496       }
497
498
499 #define GENLIST_INHERIT_THUMB_CIRCLE_DIALOGUE(SIZE_PREFIX, MASK_SIZE, PARENT) \
500      images { \
501          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png" COMP; \
502          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png" COMP; \
503          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_dim.png" COMP; \
504       } \
505       parts { \
506          GENLIST_PART_RECT("elm.thumb.clip", \
507             description { state: "default";  \
508             } \
509             description { state: "flipped";  \
510                color: 0 0 0 0; \
511             } \
512          ) \
513          GENLIST_PART_IMAGE("elm.thumb", \
514             clip_to: "elm.thumb.clip"; \
515             mouse_events: 0; \
516             GENLIST_DESCRIPTION_ENVELOP(PARENT, \
517                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png"; \
518                min: MASK_SIZE MASK_SIZE; \
519                max: MASK_SIZE MASK_SIZE; \
520                fixed:1 1; \
521             ) \
522             description { state: "selected" 0.0; \
523                inherit: "default" 0.0; \
524                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png"; \
525             } \
526             description { state: "reorder" 0.0; \
527                inherit: "default" 0.0; \
528                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_normal.png"; \
529             } \
530             description { state: "reorder_selected" 0.0; \
531                inherit: "default" 0.0; \
532                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_circle_icon_bg_press.png"; \
533             } \
534             description { state: "decorate" 0.0; \
535                inherit: "default" 0.0; \
536             } \
537             description { state: "decorate_reorder" 0.0; \
538                inherit: "reorder" 0.0; \
539             } \
540          ) \
541       }
542
543 #define GENLIST_INHERIT_THUMB_SQUARE_DIALOGUE(SIZE_PREFIX, MASK_SIZE, PARENT) \
544       images { \
545          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png" COMP; \
546          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png" COMP; \
547          image: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_dim.png" COMP; \
548       } \
549       parts { \
550          GENLIST_PART_RECT("elm.thumb.clip", \
551             description { state: "default";  \
552             } \
553             description { state: "flipped";  \
554                color: 0 0 0 0; \
555             } \
556          ) \
557          GENLIST_PART_IMAGE("elm.thumb", \
558             clip_to: "elm.thumb.clip"; \
559             mouse_events: 0; \
560             GENLIST_DESCRIPTION_ENVELOP(PARENT, \
561                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png"; \
562                min: MASK_SIZE MASK_SIZE; \
563                max: MASK_SIZE MASK_SIZE; \
564                fixed:1 1; \
565             ) \
566             description { state: "selected" 0.0; \
567                inherit: "default" 0.0; \
568                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png"; \
569             } \
570             description { state: "reorder" 0.0; \
571                inherit: "default" 0.0; \
572                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_normal.png"; \
573             } \
574             description { state: "reorder_selected" 0.0; \
575                inherit: "default" 0.0; \
576                image.normal: "Content_views/Icon_masking/"SIZE_PREFIX"/00_dialogue_square_icon_bg_press.png"; \
577             } \
578             description { state: "decorate" 0.0; \
579                inherit: "default" 0.0; \
580             } \
581             description { state: "decorate_reorder" 0.0; \
582                inherit: "reorder" 0.0; \
583             } \
584          ) \
585       }
586
587 #define GENLIST_INHERIT_THUMB_CIRCLE_MEDIUM(PARENT) \
588    GENLIST_INHERIT_THUMB_CIRCLE("72x72", GENLIST_ICON_MEDIUM_MASK_SIZE, PARENT)
589
590 #define GENLIST_INHERIT_THUMB_SQUARE_MEDIUM(PARENT) \
591    GENLIST_INHERIT_THUMB_SQUARE("72x72", GENLIST_ICON_MEDIUM_MASK_SIZE, PARENT)
592
593 #define GENLIST_INHERIT_THUMB_CIRCLE_LARGE(PARENT) \
594    GENLIST_INHERIT_THUMB_CIRCLE("99x99", GENLIST_ICON_LARGE_MASK_SIZE, PARENT)
595
596 #define GENLIST_INHERIT_THUMB_SQUARE_LARGE(PARENT) \
597    GENLIST_INHERIT_THUMB_SQUARE("99x99", GENLIST_ICON_LARGE_MASK_SIZE, PARENT)
598
599
600 #define GENLIST_INHERIT_THUMB_CIRCLE_MEDIUM_DIALOGUE(PARENT) \
601    GENLIST_INHERIT_THUMB_CIRCLE_DIALOGUE("72x72", GENLIST_ICON_MEDIUM_MASK_SIZE, PARENT)
602
603 #define GENLIST_INHERIT_THUMB_SQUARE_MEDIUM_DIALOGUE(PARENT) \
604    GENLIST_INHERIT_THUMB_SQUARE_DIALOGUE("72x72", GENLIST_ICON_MEDIUM_MASK_SIZE, PARENT)
605
606 #define GENLIST_INHERIT_THUMB_CIRCLE_LARGE_DIALOGUE(PARENT) \
607    GENLIST_INHERIT_THUMB_CIRCLE_DIALOGUE("99x99", GENLIST_ICON_LARGE_MASK_SIZE, PARENT)
608
609 #define GENLIST_INHERIT_THUMB_SQUARE_LARGE_DIALOGUE(PARENT) \
610    GENLIST_INHERIT_THUMB_SQUARE_DIALOGUE("99x99", GENLIST_ICON_LARGE_MASK_SIZE, PARENT)
611
612 //****************************************************************************//
613 // ****************************** BG Image **********************************//
614 //****************************************************************************//
615
616 #define GENLIST_PART_BG_NORMAL \
617       GENLIST_PART_RECT("bg_clip", \
618          mouse_events: 0; \
619          description { state: "default" 0.0; \
620             visible: 1; \
621             color: 255 255 255 255; \
622          } \
623          description { state: "decorate" 0.0; \
624             inherit: "default" 0.0; \
625             visible: 0; \
626          } \
627          description { state: "reorder" 0.0; \
628             inherit: "default" 0.0; \
629             visible: 0; \
630          } \
631          description { state: "decorate_reorder" 0.0; \
632             inherit: "default" 0.0; \
633             visible: 0; \
634          } \
635       ) \
636       GENLIST_PART_RECT("bg_reorder_clip", \
637          mouse_events: 0; \
638          description { state: "default" 0.0; \
639             visible: 0; \
640          } \
641          description { state: "reorder" 0.0; \
642             inherit: "default" 0.0; \
643             visible: 1; \
644             color: 255 255 255 255; \
645          } \
646          description { state: "decorate_reorder" 0.0; \
647             inherit: "default" 0.0; \
648             visible: 0; \
649          } \
650          description { state: "decorate" 0.0; \
651             inherit: "default" 0.0; \
652             visible: 0; \
653          } \
654          description { state: "reorder_flip" 0.0; \
655             inherit: "default" 0.0; \
656             visible: 0; \
657          } \
658       ) \
659       GENLIST_PART_RECT("bg",  \
660          clip_to: "bg_clip"; \
661          description { state: "default" 0.0; \
662             color: GENLIST_LIST_BG_COLOR; \
663          } \
664          description { state: "selected" 0.0; \
665             inherit: "default" 0.0; \
666             color: GENLIST_LIST_PRESS_COLOR; \
667          } \
668          description { state: "disabled" 0.0; \
669             inherit: "default" 0.0; \
670             color: GENLIST_LIST_DIM_COLOR; \
671          } \
672       ) \
673       GENLIST_PART_SPACER("bg_reorder_left", \
674          description { state: "default" 0.0; \
675             min: 16 0; \
676             max: 16 -1; \
677             fixed: 1 0; \
678             align: 0 0.5; \
679             rel2.relative: 0 1; \
680          } \
681       ) \
682       GENLIST_PART_SPACER("bg_reorder_right", \
683          description { state: "default" 0.0; \
684             min: 16 0; \
685             max: 16 -1; \
686             fixed: 1 0; \
687             align: 1.0 0.5; \
688             rel1.relative: 1 0; \
689          } \
690       ) \
691       GENLIST_PART_IMAGE("bg_reorder", \
692          clip_to: "bg_reorder_clip"; \
693          GENLIST_DESCRIPTION_LR("bg_reorder_left", "bg_reorder_right", \
694             image { \
695                normal: "00_list_group_bg.png"; \
696                border: 17 17 8 8; \
697                border_scale: 1; \
698             } \
699          ) \
700          description { state: "selected" 0.0; \
701             inherit: "default"; \
702             image { \
703                normal: "00_list_group_bg_press.png"; \
704                border: 17 17 8 8; \
705                border_scale: 1; \
706             } \
707          } \
708          description { state: "flipped" 0.0; \
709             inherit: "default"; \
710             visible: 0; \
711          } \
712       )
713
714
715 #define GENLIST_PART_BG_NORMAL_OFF \
716    GENLIST_PART_RECT("bg_clip", \
717       mouse_events: 0; \
718       description { state: "default" 0.0; \
719          visible: 0; \
720       } \
721       description { state: "decorate" 0.0; \
722          inherit: "default" 0.0; \
723          visible: 0; \
724       } \
725       description { state: "reorder" 0.0; \
726          inherit: "default" 0.0; \
727          visible: 0; \
728       } \
729       description { state: "decorate_reorder" 0.0; \
730          inherit: "default" 0.0; \
731          visible: 0; \
732       } \
733    ) \
734    GENLIST_PART_RECT("bg", \
735       mouse_events: 0; \
736       description { state: "default" 0.0; \
737          visible: 0; \
738       } \
739       description { state: "selected" 0.0; \
740          visible: 0; \
741       } \
742       description { state: "disabled" 0.0; \
743          visible: 0; \
744       } \
745    ) \
746    GENLIST_PART_RECT("bg_reorder_clip", \
747       mouse_events: 0; \
748       description { state: "default" 0.0; \
749          visible: 0; \
750       } \
751       description { state: "reorder" 0.0; \
752          visible: 0; \
753       } \
754       description { state: "decorate_reorder" 0.0; \
755          visible: 0; \
756       } \
757       description { state: "decorate" 0.0; \
758          visible: 0; \
759       } \
760       description { state: "reorder_flip" 0.0; \
761          visible: 0; \
762       } \
763    ) \
764    GENLIST_PART_IMAGE("bg_reorder", \
765       mouse_events: 0; \
766       description {state: "default" 0.0;\
767          visible: 0;\
768       }\
769       description { state: "selected" 0.0; {\
770          visible: 0; \
771       } \
772       description { state: "flipped" 0.0; {\
773          visible: 0; \
774       } \
775    )
776
777 #define GENLIST_PART_BG_DIALOGUE \
778    GENLIST_PART_RECT("bg_dialogue_clip", \
779       description { state: "default" 0.0; \
780          color: 255 255 255 255; \
781       } \
782       description { state: "2depth" 0.0; \
783          color: 220 218 211 255; \
784       } \
785    ) \
786    GENLIST_PART_SPACER("bg_dialogue_left", \
787       description { state: "default" 0.0; \
788          min: 16 0; \
789          max: 16 -1; \
790          fixed: 1 0; \
791          align: 0 0.5; \
792          rel2.relative: 0 1; \
793       } \
794    ) \
795    GENLIST_PART_SPACER("bg_dialogue_right", \
796       description { state: "default" 0.0; \
797          min: 16 0; \
798          max: 16 -1; \
799          fixed: 1 0; \
800          align: 1.0 0.5; \
801          rel1.relative: 1 0; \
802       } \
803       description { state: "editmode" 0.0; \
804          inherit: "default" 0.0; \
805          min: (GENLIST_PADDING_SIZE_DEFAULT*2+GENLIST_ICON_MEDIUM_SIZE) 0; \
806          max: (GENLIST_PADDING_SIZE_DEFAULT*2+GENLIST_ICON_MEDIUM_SIZE) 0; \
807       } \
808    ) \
809    GENLIST_PART_IMAGE("bg_dialogue", \
810       insert_after: "base"; \
811       clip_to: "bg_dialogue_clip"; \
812       GENLIST_DESCRIPTION_LR("bg_dialogue_left", "bg_dialogue_right", \
813          image { \
814             normal: "00_list_group_bg.png"; \
815             border: 17 17 8 8; \
816             border_scale: 1; \
817          } \
818       ) \
819       description { state: "selected" 0.0; \
820          inherit: "default" 0.0; \
821          image { \
822             normal: "00_list_group_bg_press.png"; \
823             border: 17 17 8 8; \
824             border_scale: 1; \
825          } \
826       } \
827       description { state: "top" 0.0; \
828          inherit: "default" 0.0; \
829          image { \
830             normal: "00_list_group_bg_top.png"; \
831             border: 17 17 8 8; \
832             border_scale: 1; \
833          } \
834       } \
835       description { state: "top_selected" 0.0; \
836          inherit: "default" 0.0; \
837          image { \
838             normal: "00_list_group_bg_top_press.png"; \
839             border: 17 17 8 8; \
840             border_scale: 1; \
841          } \
842       } \
843       description { state: "center" 0.0; \
844          inherit: "default" 0.0; \
845          image { \
846             normal: "00_list_group_bg_center.png"; \
847             border: 17 17 8 8; \
848             border_scale: 1; \
849          } \
850       } \
851       description { state: "center_selected" 0.0; \
852          inherit: "default" 0.0; \
853          image { \
854             normal: "00_list_group_bg_center_press.png"; \
855             border: 17 17 8 8; \
856             border_scale: 1; \
857          } \
858       } \
859       description { state: "bottom" 0.0; \
860          inherit: "default" 0.0; \
861          image { \
862             normal: "00_list_group_bg_bottom.png"; \
863             border: 17 17 8 8; \
864             border_scale: 1; \
865          } \
866       } \
867       description { state: "bottom_selected" 0.0; \
868          inherit: "default" 0.0; \
869          image { \
870             normal: "00_list_group_bg_bottom_press.png"; \
871             border: 17 17 8 8; \
872             border_scale: 1; \
873          } \
874       } \
875    )
876
877 //****************************************************************************//
878 // ****************************** BASE  ********************************//
879 //****************************************************************************//
880 #define GENLIST_PART_BASE_SIZE(HEIGHT) \
881          part { name: "base"; \
882             type: RECT; \
883             mouse_events: 0; \
884             scale: 1; \
885             description { state: "default" 0.0; \
886                color: 0 0 0 0; \
887                min: 0 HEIGHT; \
888             } \
889             description { state: "disabled" 0.0; \
890                inherit: "default"; \
891             } \
892          } \
893          part { name: "state"; \
894             type: RECT; \
895             mouse_events: 0; \
896             scale: 1; \
897             description { state: "default" 0.0; \
898                color: 0 0 0 0; \
899             } \
900             description { state: "decorate" 0.0; \
901                inherit: "default"; \
902             } \
903             description { state: "reorder" 0.0; \
904                inherit: "default"; \
905             } \
906             description { state: "decorate_reorder" 0.0; \
907                inherit: "default"; \
908             } \
909          }
910
911 #define GENLIST_PART_BASE \
912          GENLIST_PART_BASE_SIZE(0)
913
914 #define GENLIST_PART_FOCUS \
915    GENLIST_PART_IMAGE("focus_part", \
916       mouse_events: 0; \
917       description { state: "default" 0.0; \
918          visible: 0; \
919          image { \
920             normal: "00_focus.png"; \
921             border: 7 7 7 7; \
922          } \
923       } \
924       description { state: "focused" 0.0; \
925          inherit: "default" 0.0; \
926          visible: 1; \
927       } \
928    )
929
930 #define GENLIST_PART_FOCUS_DIALOGUE \
931    GENLIST_PART_IMAGE("focus_part", \
932       mouse_events: 0; \
933       GENLIST_DESCRIPTION_LR("bg_dialogue_left", "bg_dialogue_right", \
934          visible: 0; \
935          image { \
936             normal: "00_focus.png"; \
937             border: 7 7 7 7; \
938          } \
939       ) \
940       description { state: "focused" 0.0; \
941          inherit: "default" 0.0; \
942          visible: 1; \
943       } \
944       description { state: "top_focused" 0.0; \
945          inherit: "default" 0.0; \
946          visible: 1; \
947          image { \
948             normal: "00_list_group_bg_top_focus.png"; \
949             border: 7 7 7 7; \
950          } \
951       } \
952       description { state: "center_focused" 0.0; \
953          inherit: "default" 0.0; \
954          visible: 1; \
955          image { \
956             normal: "00_list_group_bg_center_focus.png"; \
957             border: 7 7 7 7; \
958          } \
959       } \
960       description { state: "bottom_focused" 0.0; \
961          inherit: "default" 0.0; \
962          visible: 1; \
963          image { \
964             normal: "00_list_group_bg_bottom_focus.png"; \
965             border: 7 7 7 7; \
966          } \
967       } \
968    )
969
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_SELECT_DIALOGUE( TARGET ) \
1799          program { name: "selected"; \
1800             signal: "elm,state,selected"; \
1801             source: "elm"; \
1802             script { \
1803                new st[31]; \
1804                new Float:vl; \
1805                get_state(PART:"bg_dialogue", st, 30, vl); \
1806                if (!strcmp(st, "top")) \
1807                   set_state(PART:"bg_dialogue", "top_selected", 0.0); \
1808                else if (!strcmp(st, "center")) \
1809                   set_state(PART:"bg_dialogue", "center_selected", 0.0); \
1810                else if (!strcmp(st, "bottom")) \
1811                   set_state(PART:"bg_dialogue", "bottom_selected", 0.0); \
1812                else if (!strcmp(st, "default")) \
1813                   set_state(PART:"bg_dialogue", "selected", 0.0); \
1814                run_program(PROGRAM:"target_selected"); \
1815             } \
1816          } \
1817          program { name: "unselected"; \
1818             signal: "elm,state,unselected"; \
1819             source: "elm"; \
1820             script { \
1821                new st[31]; \
1822                new Float:vl; \
1823                get_state(PART:"bg_dialogue", st, 30, vl); \
1824                if (!strcmp(st, "top_selected")) \
1825                   set_state(PART:"bg_dialogue", "top", 0.0); \
1826                else if (!strcmp(st, "center_selected"))  \
1827                   set_state(PART:"bg_dialogue", "center", 0.0); \
1828                else if (!strcmp(st, "bottom_selected"))  \
1829                   set_state(PART:"bg_dialogue", "bottom", 0.0); \
1830                else if (!strcmp(st, "selected")) \
1831                   set_state(PART:"bg_dialogue", "default", 0.0); \
1832                run_program(PROGRAM:"target_unselected"); \
1833             } \
1834          } \
1835          program { name: "target_selected"; \
1836             action: STATE_SET "selected" 0.0; \
1837             TARGET \
1838          }\
1839          program { name: "target_unselected"; \
1840             action: STATE_SET "default" 0.0; \
1841             TARGET \
1842          }\
1843          program { name: "bg_default"; \
1844             signal: "elm,state,default"; \
1845             source: "*"; \
1846             action: STATE_SET "default" 0.0; \
1847             target: "bg_dialogue"; \
1848          } \
1849          program { name: "bg_top"; \
1850             signal: "elm,state,top"; \
1851             source: "*"; \
1852             action: STATE_SET "top" 0.0; \
1853             target: "bg_dialogue"; \
1854          } \
1855          program { name: "bg_center"; \
1856             signal: "elm,state,center"; \
1857             source: "*"; \
1858             action: STATE_SET "center" 0.0; \
1859             target: "bg_dialogue"; \
1860          } \
1861          program { name: "bg_bottom"; \
1862             signal: "elm,state,bottom"; \
1863             source: "*"; \
1864             action: STATE_SET "bottom" 0.0; \
1865             target: "bg_dialogue"; \
1866          }
1867
1868 #define GENLIST_PROGRAM_SELECT_ARROW \
1869          program { name: "selected_arrow"; \
1870             signal: "elm,state,selected"; \
1871             source: "elm"; \
1872             script { \
1873                new st[31]; \
1874                new Float:vl; \
1875                get_state(PART:"arrow", st, 30, vl); \
1876                if (!strcmp(st, "default")) { \
1877                   set_state(PART:"arrow", "default_press", 0.0); \
1878                   set_state(PART:"arrow_clip", "default_press", 0.0); \
1879                } \
1880                else if (!strcmp(st, "expand_opened")) { \
1881                   set_state(PART:"arrow", "expand_opened_press", 0.0); \
1882                   set_state(PART:"arrow_clip", "expand_opened_press", 0.0); \
1883                } \
1884             } \
1885          } \
1886          program { name: "unselected_arrow"; \
1887             signal: "elm,state,unselected"; \
1888             source: "elm"; \
1889             script { \
1890                new st[31]; \
1891                new Float:vl; \
1892                get_state(PART:"arrow", st, 30, vl); \
1893                if (!strcmp(st, "default_press")) { \
1894                   set_state(PART:"arrow", "default", 0.0); \
1895                   set_state(PART:"arrow_clip", "default", 0.0); \
1896                } \
1897                else if (!strcmp(st, "expand_opened_press")) { \
1898                   set_state(PART:"arrow", "expand_opened", 0.0); \
1899                   set_state(PART:"arrow_clip", "expand_opened", 0.0); \
1900                } \
1901             } \
1902          }
1903
1904 #define GENLIST_PROGRAM_DECORATE( TARGET ) \
1905          program { name: "decorate_enabled_effect"; \
1906             signal: "elm,state,decorate,enabled,effect";\
1907             source: "elm";\
1908             action:  STATE_SET "decorate" 0.0;\
1909             TARGET \
1910          }\
1911          program { name: "decorate_disabled_effect";\
1912             signal: "elm,state,decorate,disabled,effect";\
1913             source: "elm";\
1914             action: STATE_SET "default" 0.0; \
1915             TARGET \
1916          }\
1917          program { name: "decorate_enabled";\
1918             signal: "elm,state,decorate,enabled";\
1919             source: "elm";\
1920             action:  STATE_SET "decorate" 0.0;\
1921             TARGET \
1922          }\
1923          program { name: "decorate_disabled";\
1924             signal: "elm,state,decorate,disabled";\
1925             source: "elm";\
1926             action:  STATE_SET "default" 0.0;\
1927             TARGET \
1928          }
1929
1930 #define GENLIST_PROGRAM_REORDER( TARGET ) \
1931          program { name: "reorder_enabled"; \
1932             signal: "elm,state,reorder,mode_set"; \
1933             source: "elm"; \
1934             action: STATE_SET "reorder" 0.0; \
1935             TARGET \
1936          } \
1937          program { name: "reorder_disabled"; \
1938             signal: "elm,state,reorder,mode_unset"; \
1939             source: "elm"; \
1940             action: STATE_SET "default" 0.0; \
1941             TARGET \
1942          }
1943
1944 #define GENLIST_PROGRAM_DECORATE_REORDER( NAME, TARGET ) \
1945          program { name: "reorder_enabled"NAME; \
1946             signal: "elm,state,reorder,mode_set"; \
1947             source: "elm"; \
1948             script { \
1949                new st[31]; \
1950                new Float:vl; \
1951                get_state(PART:"state", st, 30, vl); \
1952                if (!strcmp(st, "decorate") || !strcmp(st, "decorate_reorder")) { \
1953                   run_program(PROGRAM:"decorate_reorder_set"NAME); \
1954                } else { \
1955                   run_program(PROGRAM:"reorder_set"NAME); \
1956                } \
1957             } \
1958          } \
1959          program { name: "reorder_disabled"NAME; \
1960             signal: "elm,state,reorder,mode_unset"; \
1961             source: "elm"; \
1962             script { \
1963                new st[31]; \
1964                new Float:vl; \
1965                get_state(PART:"state", st, 30, vl); \
1966                if (!strcmp(st, "decorate") || !strcmp(st, "decorate_reorder")) { \
1967                   run_program(PROGRAM:"decorate_set"NAME); \
1968                } else { \
1969                   run_program(PROGRAM:"default_set"NAME); \
1970                } \
1971             } \
1972          } \
1973          program { name: "decorate_enabled_effect"NAME; \
1974             signal: "elm,state,decorate,enabled,effect";\
1975             source: "elm";\
1976             script { \
1977                new st[31]; \
1978                new Float:vl; \
1979                get_state(PART:"state", st, 30, vl); \
1980                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
1981                   run_program(PROGRAM:"decorate_reorder_set"NAME); \
1982                } else { \
1983                   run_program(PROGRAM:"decorate_set"NAME); \
1984                } \
1985             } \
1986          }\
1987          program { name: "decorate_disabled_effect"NAME;\
1988             signal: "elm,state,decorate,disabled,effect";\
1989             source: "elm";\
1990             script { \
1991                new st[31]; \
1992                new Float:vl; \
1993                get_state(PART:"state", st, 30, vl); \
1994                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
1995                   run_program(PROGRAM:"reorder_set"NAME); \
1996                } else { \
1997                   run_program(PROGRAM:"default_set"NAME); \
1998                } \
1999             } \
2000          }\
2001          program { name: "decorate_enabled"NAME;\
2002             signal: "elm,state,decorate,enabled";\
2003             source: "elm";\
2004             script { \
2005                new st[31]; \
2006                new Float:vl; \
2007                get_state(PART:"state", st, 30, vl); \
2008                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
2009                   run_program(PROGRAM:"decorate_reorder_set"NAME); \
2010                } else { \
2011                   run_program(PROGRAM:"decorate_set"NAME); \
2012                } \
2013             } \
2014          }\
2015          program { name: "decorate_disabled"NAME;\
2016             signal: "elm,state,decorate,disabled";\
2017             source: "elm";\
2018             script { \
2019                new st[31]; \
2020                new Float:vl; \
2021                get_state(PART:"state", st, 30, vl); \
2022                if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) { \
2023                   run_program(PROGRAM:"reorder_set"NAME); \
2024                } else { \
2025                   run_program(PROGRAM:"default_set"NAME); \
2026                } \
2027             } \
2028          } \
2029          program { name: "default_set"NAME; \
2030             action: STATE_SET "default" 0.0;\
2031             target: "state"; \
2032             TARGET \
2033          } \
2034          program { name: "decorate_set"NAME; \
2035             action: STATE_SET "decorate" 0.0;\
2036             target: "state"; \
2037             TARGET \
2038          } \
2039          program { name: "reorder_set"NAME; \
2040             action: STATE_SET "reorder" 0.0;\
2041             target: "state"; \
2042             TARGET \
2043          } \
2044          program { name: "decorate_reorder_set"NAME; \
2045             action: STATE_SET "decorate_reorder" 0.0;\
2046             target: "state"; \
2047             TARGET \
2048          }
2049
2050 #define GENLIST_PROGRAM_FLIP \
2051          program { name: "flip_enabled"; \
2052             signal:  "elm,state,flip,enabled"; \
2053             source:  "elm"; \
2054             transition: DECELERATE 0.5; \
2055             action:  STATE_SET "flipped" 0.0; \
2056             target: "elm.flip.content"; \
2057             target: "elm.flip.icon"; \
2058          } \
2059          program { name: "flip_disabled"; \
2060             signal:  "elm,state,flip,disabled"; \
2061             source:  "elm"; \
2062             transition: DECELERATE 0.5; \
2063             action:  STATE_SET "default" 0.0; \
2064             target: "elm.flip.content"; \
2065             target: "elm.flip.icon"; \
2066          } \
2067          program { name: "flip_enabled_bg"; \
2068             signal:  "elm,state,flip,enabled"; \
2069             source:  "elm"; \
2070             action:  STATE_SET "flipped" 0.0; \
2071             target: "elm.flip.bg"; \
2072          } \
2073          program { name: "flip_disabled_bg"; \
2074             signal:  "elm,state,flip,disabled"; \
2075             source:  "elm"; \
2076             action:  STATE_SET "default" 0.0; \
2077             target: "elm.flip.bg"; \
2078          } \
2079          program { \
2080             signal: "elm,state,eraser,show"; \
2081             action: STATE_SET "show" 0.0; \
2082             target: "elm.flip.eraser"; \
2083          } \
2084          program { \
2085             signal: "elm,state,eraser,hide"; \
2086             action: STATE_SET "default" 0.0; \
2087             target: "elm.flip.eraser"; \
2088          }
2089
2090 #define GENLIST_PROGRAM_FLIP_TARGET( TARGET ) \
2091          program { name: "flip_enabled_target"; \
2092             signal:  "elm,state,flip,enabled"; \
2093             source:  "elm"; \
2094             action:  STATE_SET "flipped" 0.0; \
2095             TARGET \
2096          } \
2097          program { name: "flip_disabled_target"; \
2098             signal:  "elm,state,flip,disabled"; \
2099             source:  "elm"; \
2100             action:  STATE_SET "default" 0.0; \
2101             TARGET \
2102          }
2103
2104 #define GENLIST_PROGRAM_FLIP_EFFECT_TARGET( TARGET ) \
2105          program { name: "flip_enabled_effect"; \
2106             signal:  "elm,state,flip,enabled"; \
2107             source:  "elm"; \
2108             transition: DECELERATE 0.5; \
2109             action:  STATE_SET "flipped" 0.0; \
2110             TARGET \
2111          } \
2112          program { name: "flip_disabled_effect"; \
2113             signal:  "elm,state,flip,disabled"; \
2114             source:  "elm"; \
2115             transition: DECELERATE 0.5; \
2116             action:  STATE_SET "default" 0.0; \
2117             TARGET \
2118          }
2119
2120 #define GENLIST_PROGRAM_EDITMODE \
2121    program { name: "edit_enabled"; \
2122       signal:  "elm,state,edit,enabled"; \
2123       source:  "*"; \
2124       action:  STATE_SET "editmode" 0.0; \
2125       target: "elm.padding.right.edit"; \
2126       target: "elm.icon.edit"; \
2127       target: "bg_dialogue_right"; \
2128    } \
2129    program { name: "edit_disabled"; \
2130       signal:  "elm,state,edit,disabled"; \
2131       source:  "*"; \
2132       action:  STATE_SET "default" 0.0; \
2133       target: "elm.padding.right.edit"; \
2134       target: "elm.icon.edit"; \
2135       target: "bg_dialogue_right"; \
2136    }
2137
2138 /***************************************************************************/
2139 /***************************************************************************/
2140
2141 #define GENLIST_PROGRAMS_NORMAL( TARGET ) \
2142    programs { \
2143       GENLIST_PROGRAM_DEFAULT( TARGET \
2144          target: "bg"; \
2145          target: "bg_clip"; \
2146          target: "bottom_line"; \
2147          target: "bottom_line2"; \
2148          target: "bottom_line_clip"; \
2149          target: "bg_reorder"; \
2150          target: "elm.padding.left"; \
2151          target: "elm.padding.right"; \
2152       ) \
2153       GENLIST_PROGRAM_DISABLED( TARGET \
2154          target: "bg"; \
2155          target: "bottom_line"; \
2156          target: "bottom_line2"; \
2157          target: "bg_reorder"; \
2158       ) \
2159       GENLIST_PROGRAM_FOCUS \
2160       GENLIST_PROGRAM_SELECT( TARGET \
2161          target: "bg"; \
2162          target: "bottom_line"; \
2163          target: "bottom_line2"; \
2164          target: "bg_reorder"; \
2165       ) \
2166       GENLIST_PROGRAM_SOUND("bg") \
2167       GENLIST_PROGRAM_SOUND("bg_reorder") \
2168       GENLIST_PROGRAM_DECORATE_REORDER("normal", TARGET \
2169          target: "bg_clip"; \
2170          target: "bg_reorder_clip"; \
2171          target: "bottom_line_clip"; \
2172          target: "elm.padding.left"; \
2173          target: "elm.padding.right"; \
2174       ) \
2175       GENLIST_PROGRAM_FLIP \
2176    }
2177
2178 // FIXME: inheritance !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
2179 // if GENLIST_PROGRAM_EXPAND is here, expanda effect is something wrong.
2180 // because after can be duplicated when program inheriting.
2181 #define GENLIST_PROGRAMS_DIALOGUE( TARGET ) \
2182    programs { \
2183       GENLIST_PROGRAM_DEFAULT( TARGET \
2184          target: "bg_dialogue"; \
2185          target: "bg_dialogue_clip"; \
2186          target: "elm.padding.left"; \
2187          target: "elm.padding.right"; \
2188       ) \
2189       GENLIST_PROGRAM_DISABLED( TARGET ) \
2190       GENLIST_PROGRAM_FOCUS_DIALOGUE \
2191       GENLIST_PROGRAM_SELECT_DIALOGUE( TARGET ) \
2192       program { name: "bg_color_change"; \
2193          signal: "bg_color_change"; \
2194          source: "elm"; \
2195          action: STATE_SET "2depth" 0.0; \
2196          target: "bg_dialogue_clip"; \
2197       } \
2198       GENLIST_PROGRAM_SOUND("bg_dialogue") \
2199       GENLIST_PROGRAM_DECORATE_REORDER( "normal", TARGET \
2200          target: "elm.padding.left"; \
2201          target: "elm.padding.right"; \
2202       ) \
2203       GENLIST_PROGRAM_FLIP \
2204       GENLIST_PROGRAM_EDITMODE \
2205    }
2206
2207 #define GENLIST_PROGRAMS_DECORATE_EFFECT( TARGET ) \
2208    program { name: "decorate_enabled_effect_ef"; \
2209       signal: "elm,state,decorate,enabled,effect";\
2210       source: "elm";\
2211       transition: DECELERATE 0.5;\
2212       action:  STATE_SET "decorate" 0.0;\
2213       TARGET \
2214    }\
2215    program { name: "decorate_disabled_effect_ef";\
2216       signal: "elm,state,decorate,disabled,effect";\
2217       source: "elm";\
2218       transition: ACCELERATE 0.5;\
2219       action:  STATE_SET "default" 0.0;\
2220       TARGET \
2221    } \
2222    program { name: "decorate_enabled_ef";\
2223       signal: "elm,state,decorate,enabled";\
2224       source: "elm";\
2225       action:  STATE_SET "decorate" 0.0;\
2226       TARGET \
2227    }\
2228    program { name: "decorate_disabled_ef";\
2229       signal: "elm,state,decorate,disabled";\
2230       source: "elm";\
2231       action:  STATE_SET "default" 0.0;\
2232       TARGET \
2233    }
2234
2235 #define GENLIST_PROGRAMS_ENTRY( TARGET ) \
2236    GENLIST_PROGRAM_DEFAULT( TARGET \
2237       target: "bg"; \
2238       target: "bg_clip"; \
2239       target: "bottom_line"; \
2240       target: "bottom_line2"; \
2241       target: "bottom_line_clip"; \
2242       target: "bg_reorder"; \
2243       target: "elm.padding.left"; \
2244       target: "elm.padding.right"; \
2245    ) \
2246    GENLIST_PROGRAM_DISABLED( TARGET ) \
2247    GENLIST_PROGRAM_FOCUS \
2248    GENLIST_PROGRAM_DECORATE_REORDER("editfield", TARGET \
2249       target: "bg_clip"; \
2250       target: "bg_reorder_clip"; \
2251       target: "bottom_line_clip"; \
2252       target: "elm.padding.left"; \
2253       target: "elm.padding.right"; \
2254    )
2255
2256 #define GENLIST_PROGRAMS_DIALOGUE_ENTRY( TARGET ) \
2257    GENLIST_PROGRAM_DEFAULT( TARGET \
2258       target: "bg_dialogue"; \
2259       target: "bg_dialogue_clip"; \
2260       target: "elm.padding.left"; \
2261       target: "elm.padding.right"; \
2262    ) \
2263    GENLIST_PROGRAM_DISABLED( TARGET ) \
2264    GENLIST_PROGRAM_FOCUS_DIALOGUE \
2265    program { name: "bg_color_change"; \
2266       signal: "bg_color_change"; \
2267       source: "elm"; \
2268       action: STATE_SET "2depth" 0.0; \
2269       target: "bg_dialogue_clip"; \
2270    } \
2271    GENLIST_PROGRAM_DECORATE_REORDER( "normal", TARGET \
2272       target: "elm.padding.left"; \
2273       target: "elm.padding.right"; \
2274    ) \
2275    GENLIST_PROGRAM_FLIP \
2276    GENLIST_PROGRAM_EDITMODE
2277
2278
2279 #define GENLIST_PROGRAMS_THUMB \
2280    GENLIST_PROGRAM_DECORATE_REORDER( "thumb", target: "elm.thumb"; ) \
2281    GENLIST_PROGRAM_FLIP_TARGET( target: "elm.thumb.clip"; ) \
2282    program { name: "enabled_thumb"; \
2283       signal: "elm,state,enabled"; \
2284       source: "elm"; \
2285       action: STATE_SET "default" 0.0; \
2286       target: "base"; \
2287       target: "elm.thumb"; \
2288    } \
2289    program { name: "disabled_thumb"; \
2290       signal: "elm,state,disabled"; \
2291       source: "elm"; \
2292       action: STATE_SET "disabled" 0.0; \
2293       target: "base"; \
2294       target: "elm.thumb"; \
2295    } \
2296    program { name: "selected_thumb"; \
2297       signal: "elm,state,selected"; \
2298       source: "elm"; \
2299       script { \
2300          new st[31]; \
2301          new Float:vl; \
2302          get_state(PART:"elm.thumb", st, 30, vl); \
2303          if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) \
2304             set_state(PART:"elm.thumb", "reorder_selected", 0.0); \
2305          else \
2306             set_state(PART:"elm.thumb", "selected", 0.0); \
2307       } \
2308    } \
2309    program { name: "unselected_thumb"; \
2310       signal: "elm,state,unselected"; \
2311       source: "elm"; \
2312       script { \
2313          new st[31]; \
2314          new Float:vl; \
2315          get_state(PART:"elm.thumb", st, 30, vl); \
2316          if (!strcmp(st, "reorder_selected")) \
2317             set_state(PART:"elm.thumb", "reorder", 0.0); \
2318          else \
2319             set_state(PART:"elm.thumb", "default", 0.0); \
2320       } \
2321    }
2322
2323 //****************************************************************************//
2324 // *******************************  Icon Part ******************************//
2325 //***************************************************************************//
2326 #define GENLIST_PART_ICON(NAME, DESCRIPION) \
2327    part { name: NAME; \
2328       scale: 1; \
2329       type: SWALLOW; \
2330       DESCRIPION \
2331    }
2332
2333 #define GENLIST_PARAM_ICON_BIG \
2334          min: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE; \
2335          max: GENLIST_ICON_MEDIUM_SIZE GENLIST_ICON_MEDIUM_SIZE;
2336
2337 #define GENLIST_PARAM_ICON_SMALL \
2338          min: GENLIST_ICON_SMALL_SIZE GENLIST_ICON_SMALL_SIZE; \
2339          max: GENLIST_ICON_SMALL_SIZE GENLIST_ICON_SMALL_SIZE;
2340
2341 #define GENLIST_PARAM_ICON_BTN_01 \
2342          min: 0 GENLIST_BTN_01_HEIGHT; \
2343          max: -1 GENLIST_BTN_01_HEIGHT;
2344
2345 #define GENLIST_PARAM_ICON_BTN_02 \
2346          min: GENLIST_BTN_02_SIZE GENLIST_BTN_02_SIZE; \
2347          max: GENLIST_BTN_02_SIZE GENLIST_BTN_02_SIZE;
2348
2349 #define GENLIST_PARAM_ICON_ONOFF_WIDTH \
2350          min: GENLIST_ICON_ONOFF_WIDTH GENLIST_ICON_ONOFF_HEIGHT; \
2351          max: GENLIST_ICON_ONOFF_WIDTH GENLIST_ICON_ONOFF_HEIGHT;
2352
2353 #define GENLIST_PARAM_ICON_THUMBNAIL1\
2354          min: GENLIST_ICON_LARGE_SIZE GENLIST_ICON_LARGE_SIZE; \
2355          max: GENLIST_ICON_LARGE_SIZE GENLIST_ICON_LARGE_SIZE;
2356
2357 #define GENLIST_PARAM_ICON_CHECK_RADIO \
2358          min: GENLIST_ICON_CHECK_RADIO_SIZE GENLIST_ICON_CHECK_RADIO_SIZE; \
2359          max: GENLIST_ICON_CHECK_RADIO_SIZE GENLIST_ICON_CHECK_RADIO_SIZE;
2360
2361 #define GENLIST_PARAM_ICON_STAR \
2362          min: GENLIST_ICON_STAR_SIZE GENLIST_ICON_STAR_SIZE; \
2363          max: GENLIST_ICON_STAR_SIZE GENLIST_ICON_STAR_SIZE; \
2364
2365 #define GENLIST_PART_ICON_BIG_R(NAME, RIGHT) \
2366    GENLIST_PART_ICON(NAME, \
2367       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2368          fixed: 1 1; \
2369          GENLIST_PARAM_ICON_BIG \
2370       ) \
2371    )
2372
2373 #define GENLIST_PART_ICON_BIG_L(NAME, LEFT) \
2374    GENLIST_PART_ICON(NAME, \
2375       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2376          GENLIST_PARAM_ICON_BIG \
2377          fixed: 1 1; \
2378       ) \
2379    )
2380
2381 #define GENLIST_PART_ICON_SMALL_L(NAME, LEFT) \
2382    GENLIST_PART_ICON(NAME, \
2383       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2384          GENLIST_PARAM_ICON_SMALL \
2385          fixed: 1 1; \
2386       ) \
2387    )
2388
2389 #define GENLIST_PART_ICON_SMALL_LB(NAME, LEFT, BOTTOM) \
2390    GENLIST_PART_ICON(NAME, \
2391       GENLIST_DESCRIPTION_LB(LEFT, BOTTOM, \
2392         GENLIST_PARAM_ICON_SMALL \
2393         fixed: 1 1; \
2394       ) \
2395    )
2396
2397 #define GENLIST_PART_ICON_SMALL_LTB(NAME, LEFT, TOP, BOTTOM) \
2398    GENLIST_PART_ICON(NAME, \
2399       GENLIST_DESCRIPTION_LTB(LEFT, TOP, BOTTOM, \
2400          GENLIST_PARAM_ICON_SMALL \
2401          fixed: 1 1; \
2402       ) \
2403    )
2404
2405 #define GENLIST_PART_ICON_SMALL_RTB(NAME, RIGHT, TOP, BOTTOM) \
2406    GENLIST_PART_ICON(NAME, \
2407       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
2408          GENLIST_PARAM_ICON_SMALL \
2409          fixed: 1 1; \
2410       ) \
2411    )
2412
2413 #define GENLIST_PART_ICON_BTN_01_RTB(NAME, RIGHT, TOP, BOTTOM) \
2414    GENLIST_PART_ICON(NAME, \
2415       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM,\
2416          GENLIST_PARAM_ICON_BTN_01 \
2417          fixed: 1 1; \
2418       ) \
2419    )
2420
2421 #define GENLIST_PART_ICON_BTN_02_RTB(NAME, RIGHT, TOP, BOTTOM) \
2422    GENLIST_PART_ICON(NAME, \
2423       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM,\
2424          GENLIST_PARAM_ICON_BTN_02 \
2425          fixed: 1 1; \
2426       ) \
2427    )
2428
2429 #define GENLIST_PART_ICON_BTN_ONOFF_R(NAME, RIGHT) \
2430    GENLIST_PART_ICON(NAME, \
2431       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2432          GENLIST_PARAM_ICON_ONOFF_WIDTH \
2433          fixed: 1 1; \
2434       ) \
2435    )
2436
2437 #define GENLIST_PART_ICON_BTN_ONOFF_L(NAME, LEFT) \
2438    GENLIST_PART_ICON(NAME, \
2439       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2440          GENLIST_PARAM_ICON_ONOFF_WIDTH \
2441          fixed: 1 1; \
2442       ) \
2443    )
2444
2445 #define GENLIST_PART_ICON_THUMBNAIL1_R(NAME, RIGHT) \
2446    GENLIST_PART_ICON(NAME, \
2447       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2448          GENLIST_PARAM_ICON_THUMBNAIL1 \
2449          fixed: 1 1; \
2450       ) \
2451    )
2452
2453 #define GENLIST_PART_ICON_CHECK_RADIO_L(NAME, LEFT) \
2454    GENLIST_PART_ICON(NAME, \
2455       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
2456          GENLIST_PARAM_ICON_CHECK_RADIO \
2457          fixed: 1 1; \
2458       ) \
2459    )
2460
2461 #define GENLIST_PART_ICON_STAR_RTB(NAME, RIGHT, TOP, BOTTOM) \
2462    GENLIST_PART_ICON(NAME, \
2463       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
2464          GENLIST_PARAM_ICON_STAR \
2465          fixed: 1 1; \
2466       ) \
2467    )
2468
2469 /*****************************************************************************/
2470 /******************************* Genlist IMAGE ********************************/
2471 /*****************************************************************************/
2472 #define GENLIST_PART_IMAGE(NAME, DESCRIPION) \
2473    part { name: NAME; \
2474       scale: 1; \
2475       type: IMAGE; \
2476       DESCRIPION \
2477    }
2478
2479 #define GENLIST_PARAM_PASSWORD_IMAGE \
2480             min: GENLIST_ICON_PASSWORD_SIZE GENLIST_ICON_PASSWORD_SIZE; \
2481             max: GENLIST_ICON_PASSWORD_SIZE GENLIST_ICON_PASSWORD_SIZE; \
2482             image.normal: "00_search_edit_field_bg_02.png"; \
2483             image.border: 12 13 12 13; \
2484             image.border_scale: 1;
2485
2486 /*****************************************************************************/
2487 /******************************* Genlist Bubble ********************************/
2488 /*****************************************************************************/
2489 #define GENLIST_IMAGES_EXPANDABLE_BTN \
2490          images { \
2491             image: "00_button_expand_closed.png" COMP; \
2492             image: "00_button_expand_opened.png" COMP; \
2493          }
2494
2495 #define GENLIST_PART_EXPANDABLE_ARROW \
2496          GENLIST_PART_ICON("touch_arrow", \
2497             ignore_flags: ON_HOLD; \
2498             GENLIST_DESCRIPTION_ENVELOP("arrow", ) \
2499          ) \
2500          GENLIST_PART_RECT("arrow_clip", \
2501             GENLIST_DESCRIPTION_ENVELOP("arrow", \
2502                color: 101 101 101 255; \
2503             ) \
2504             description { state: "disabled" 0.0; \
2505                color: 101 101 101 76; \
2506             } \
2507             description { state: "expand_opened_press" 0.0; \
2508                color: 248 246 239 255; \
2509             } \
2510             description { state: "default_press" 0.0; \
2511                color: 248 246 239 255; \
2512             } \
2513          ) \
2514          GENLIST_PART_IMAGE("arrow", \
2515             clip_to: "arrow_clip"; \
2516             ignore_flags: ON_HOLD; \
2517             mouse_events: 0; \
2518             GENLIST_DESCRIPTION_R("elm.padding.right", \
2519                fixed: 1 1; \
2520                min: 45 45; \
2521                max: 45 45; \
2522                image.normal: "00_button_expand_closed.png"; \
2523             ) \
2524             description { state: "default_press" 0.0; \
2525                inherit: "default" 0.0; \
2526                image.normal: "00_button_expand_closed_press.png"; \
2527             } \
2528             description { state: "expand_opened" 0.0; \
2529                inherit: "default" 0.0; \
2530                image.normal: "00_button_expand_opened.png"; \
2531             } \
2532             description { state: "expand_opened_press" 0.0; \
2533                inherit: "expand_opened" 0.0; \
2534                image.normal: "00_button_expand_opened_press.png"; \
2535             } \
2536          )
2537 /*****************************************************************************/
2538 /******************************* Genlist RECT ********************************/
2539 /*****************************************************************************/
2540 #define GENLIST_PART_SPACER(NAME, DESCRIPION) \
2541     part { name: NAME; \
2542       scale: 1; \
2543       mouse_events: 0; \
2544       type: SPACER; \
2545       DESCRIPION \
2546    }
2547
2548 #define GENLIST_PART_RECT(NAME, DESCRIPION) \
2549     part { name: NAME; \
2550       scale: 1; \
2551       type: RECT; \
2552       DESCRIPION \
2553    }
2554
2555 /*****************************************************************************/
2556 /******************************* Genlist TEXT ********************************/
2557 /*****************************************************************************/
2558 // FIXME: because, when naviframe item is pushed,
2559 // naviframe freeze all events so text events cannot be repeated. :-(
2560 // So all texts should have it's own sound program, not repeat to BG
2561 #define GENLIST_PART_TEXT(NAME, DESCRIPION) \
2562     part { name: NAME; \
2563       scale: 1; \
2564       type: TEXT; \
2565       DESCRIPION \
2566    }
2567
2568 #define GENLIST_PART_TEXTBLOCK(NAME, DESCRIPION) \
2569     part { name: NAME; \
2570       scale: 1; \
2571       type: TEXTBLOCK; \
2572       DESCRIPION \
2573    }
2574
2575 /*************************** parameters **********************************/
2576 #define GENLIST_PARAM_TEXT_LIMIT_RB \
2577    rel1.to_x: "base"; /* This limits text growing. */\
2578    rel1.relative: 0.35 0; /* This limits text growing. */\
2579    text.max: 1 0; /* This limits text growing. */
2580
2581 #define GENLIST_PARAM_TEXT_LIMIT_RT \
2582    rel1.to_x: "base"; /* This limits text growing. */\
2583    rel1.relative: 0.35 1; /* This limits text growing. */\
2584    text.max: 1 0; /* This limits text growing. */
2585
2586 #define GENLIST_PARAM_TEXT_LIMIT_RTB \
2587    rel1.to_x: "base"; /* This limits text growing. */\
2588    rel1.relative: 0.35 1; /* This limits text growing. */\
2589    text.max: 1 0; /* This limits text growing. */
2590
2591 // Group Title
2592 #define GENLIST_PARAM_DIALOGUE_GROUP_TITLE \
2593    color: GENLIST_DIALOGUE_GROUP_TITLE_COLOR; \
2594    text { \
2595       align: 0.0 0.5; \
2596       font: "Tizen:style=Bold"; \
2597       min: 0 1; \
2598       size: GENLIST_DIALOGUE_GROUP_TITLE_SIZE; \
2599       text_class: "list_item"; \
2600    }
2601
2602 // Password style
2603 #define GENLIST_PARAM_PASSWORD_TITLE \
2604    color: DIALOGUE_PASSWORD_TITLE_COLOR; \
2605    text { \
2606       font: "Tizen:style=Bold"; \
2607       size: DIALOGUE_PASSWORD_TITLE_SIZE; \
2608       min: 0 1; \
2609       align: 0 0.5; \
2610       text_class: "list_item"; \
2611    }
2612
2613 // Progress main text
2614 #define GENLIST_PARAM_PROGRESS_MAIN \
2615    color: GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR; \
2616    text { \
2617       align: 0 0.5; \
2618       min: 0 1; \
2619       font: "Tizen:style=Regular"; \
2620       size: GENLIST_PROGRESS_MAIN_TEXT_SIZE; \
2621       text_class: "list_item"; \
2622    }
2623
2624 // list main text
2625 #define GENLIST_PARAM_LISTITEM \
2626    color: GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR; \
2627    text { \
2628       align: 0 0.5; \
2629       min: 0 1; \
2630       font: "Tizen:style=Regular"; \
2631       size: GENLIST_LIST_MAIN_TEXT_SIZE; \
2632       text_class: "list_item"; \
2633    }
2634
2635 #define GENLIST_PARAM_LISTITEM_TB \
2636    text { \
2637       min: 0 1; \
2638       style: "genlist_style_list_main_text_unread"; \
2639    }
2640
2641 #define GENLIST_PARAM_LISTITEM_TB_WRAP \
2642    text { \
2643       min: 0 1; \
2644       style: "genlist_style_list_main_text_unread_wrap"; \
2645    }
2646
2647 // list subtext
2648 #define GENLIST_PARAM_SUBITEM_DEFAULT \
2649    color: GENLIST_LIST_SUB_TEXT_DEFAULT_COLOR; \
2650    text { \
2651       align: 0 0.5; \
2652       min: 0 1; \
2653       font: "Tizen:style=Bold"; \
2654       size: GENLIST_LIST_SUB_TEXT_SIZE; \
2655       text_class: "tizen"; \
2656    }
2657
2658 #define GENLIST_PARAM_SUBITEM_SETTINGS \
2659    color: GENLIST_LIST_SUB_TEXT_SETTINGS_COLOR; \
2660    text { \
2661       align: 0 0.5; \
2662       min: 0 1; \
2663       font: "Tizen:style=Bold"; \
2664       size: GENLIST_LIST_SUB_TEXT_SIZE; \
2665       text_class: "tizen"; \
2666    }
2667
2668 #define GENLIST_PARAM_SUBITEM_DEFAULT_TB \
2669    text { \
2670       min: 0 1; \
2671       style: "genlist_style_list_sub_text_default"; \
2672    }
2673
2674 #define GENLIST_PARAM_SUBITEM_DEFAULT_TB_WRAP \
2675    text { \
2676       min: 0 1; \
2677       style: "genlist_style_list_sub_text_default_wrap"; \
2678    }
2679
2680 #define GENLIST_PARAM_SUBITEM_SETTINGS_TB \
2681    text { \
2682       min: 0 1; \
2683       style: "genlist_style_list_sub_text_settings"; \
2684    }
2685
2686 // list subtext 02
2687 #define GENLIST_PARAM_SUBITEM_02 \
2688    color: GENLIST_LIST_SUB_TEXT_02_COLOR; \
2689    text { \
2690       align: 0 0.5; \
2691       min: 0 1; \
2692       font: "Tizen:style=Bold"; \
2693       size: GENLIST_LIST_SUB_TEXT_02_SIZE; \
2694       text_class: "tizen"; \
2695    }
2696
2697 // Dialogue group - Apps
2698 #define GENLIST_PARAM_APPS_NAME\
2699    color: GENLIST_APPS_NAME_COLOR; \
2700    text { \
2701       align: 0 0.5; \
2702       min: 0 1; \
2703       font: "Tizen:style=Bold"; \
2704       size: GENLIST_APPS_NAME_SIZE; \
2705       text_class: "list_item"; \
2706    }
2707
2708 #define GENLIST_PARAM_APPS_INC\
2709    color: GENLIST_APPS_INC_COLOR; \
2710    text { \
2711       align: 0 0.5; \
2712       min: 0 1; \
2713       font: "Tizen:style=Bold"; \
2714       size: GENLIST_APPS_INC_SIZE; \
2715       text_class: "list_item"; \
2716    }
2717
2718 #define GENLIST_PARAM_APPS_RATING\
2719    color: GENLIST_APPS_RATING_COLOR; \
2720    text { \
2721       align: 0 0.5; \
2722       min: 0 1; \
2723       font: "Tizen:style=Bold"; \
2724       size: GENLIST_APPS_RATING_SIZE; \
2725       text_class: "list_item"; \
2726    }
2727
2728 #define GENLIST_PARAM_APPS_PRICE\
2729    color: GENLIST_APPS_PRICE_ORIGINAL_COLOR; \
2730    text { \
2731       align: 0 0.5; \
2732       min: 0 1; \
2733       font: "Tizen:style=Bold"; \
2734       size: GENLIST_APPS_PRICE_SIZE; \
2735       text_class: "list_item"; \
2736    }
2737
2738 #define GENLIST_PARAM_APPS_PRICE_SALE\
2739    color: GENLIST_APPS_PRICE_SALE_COLOR; \
2740    text { \
2741       align: 0 0.5; \
2742       min: 0 1; \
2743       font: "Tizen:style=Bold"; \
2744       size: GENLIST_APPS_PRICE_SIZE; \
2745       text_class: "list_item"; \
2746    }
2747
2748 #define GENLIST_PARAM_CONTENTS_TEXT \
2749    color: GENLIST_CONTENTS_TEXT_COLOR; \
2750    text { \
2751       align: 0 0.5; \
2752       min: 0 1; \
2753       font: "Tizen:style=Regular"; \
2754       size: GENLIST_CONTENTS_TEXT_SIZE; \
2755       text_class: "tizen"; \
2756    }
2757
2758 /*************************** Descriptions **********************************/
2759 // list main text
2760 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2761    description { state: "disabled" 0.0; \
2762       inherit: "default" 0.0; \
2763       color: GENLIST_LIST_MAIN_TEXT_UNREAD_DIM_COLOR; \
2764    } \
2765    description { state: "read" 0.0; \
2766       inherit: "default" 0.0; \
2767       color: GENLIST_LIST_MAIN_TEXT_READ_COLOR; \
2768    } \
2769    description { state: "read,disabled" 0.0; \
2770       inherit: "default" 0.0; \
2771       color: GENLIST_LIST_MAIN_TEXT_READ_DIM_COLOR; \
2772    } \
2773    description { state: "selected" 0.0; \
2774       inherit: "default" 0.0; \
2775       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2776    }
2777
2778 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2779    description { state: "disabled" 0.0; \
2780       inherit: "default" 0.0; \
2781       text.style: "genlist_style_list_main_text_unread_dim"; \
2782    } \
2783    description { state: "read" 0.0; \
2784       inherit: "default" 0.0; \
2785       text.style: "genlist_style_list_main_text_read"; \
2786    } \
2787    description { state: "read,disabled" 0.0; \
2788       inherit: "default" 0.0; \
2789       text.style: "genlist_style_list_main_text_read_dim"; \
2790    } \
2791    description { state: "selected" 0.0; \
2792       inherit: "default" 0.0; \
2793       text.style: "genlist_style_list_main_text_focus"; \
2794    }
2795
2796 // list sub text
2797 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2798    description { state: "disabled" 0.0; \
2799       inherit: "default" 0.0; \
2800       color: GENLIST_LIST_SUB_TEXT_DEFAULT_DIM_COLOR; \
2801    } \
2802    description { state: "selected" 0.0; \
2803       inherit: "default" 0.0; \
2804       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2805    }
2806
2807 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
2808    description { state: "disabled" 0.0; \
2809       inherit: "default" 0.0; \
2810       text.style: "genlist_style_list_sub_text_default_dim"; \
2811    } \
2812    description { state: "selected" 0.0; \
2813       inherit: "default" 0.0; \
2814       text.style: "genlist_style_list_sub_text_focus"; \
2815    }
2816
2817 #define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB_WRAP \
2818    description { state: "disabled" 0.0; \
2819       inherit: "default" 0.0; \
2820       text.style: "genlist_style_list_sub_text_default_dim_wrap"; \
2821    } \
2822    description { state: "selected" 0.0; \
2823       inherit: "default" 0.0; \
2824       text.style: "genlist_style_list_sub_text_focus_wrap"; \
2825    }
2826
2827 #define GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
2828    description { state: "disabled" 0.0; \
2829       inherit: "default" 0.0; \
2830       color: GENLIST_LIST_SUB_TEXT_SETTINGS_DIM_COLOR; \
2831    } \
2832    description { state: "selected" 0.0; \
2833       inherit: "default" 0.0; \
2834       color: GENLIST_LIST_TEXT_FOCUS_COLOR; \
2835    }
2836
2837 #define GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS_TB \
2838    description { state: "disabled" 0.0; \
2839       inherit: "default" 0.0; \
2840       text.style: "genlist_style_list_sub_text_settings_dim"; \
2841    } \
2842    description { state: "selected" 0.0; \
2843       inherit: "default" 0.0; \
2844       text.style: "genlist_style_list_sub_text_focus"; \
2845    }
2846
2847 // list main text multiline
2848 #define GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB_WRAP \
2849    description { state: "disabled" 0.0; \
2850       inherit: "default" 0.0; \
2851       text.style: "genlist_style_list_main_text_unread_dim_wrap"; \
2852    } \
2853    description { state: "selected" 0.0; \
2854       inherit: "default" 0.0; \
2855       text.style: "genlist_style_list_main_text_focus_wrap"; \
2856    }
2857
2858 /*************************** Parts **********************************/
2859 #define GENLIST_PART_DIALOGUE_GROUP_HELP_TEXT(NAME, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2860    GENLIST_PART_TEXTBLOCK(NAME, \
2861       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2862          text { \
2863             min: 0 1; \
2864             style: "genlist_style_dialogue_group_help_text"; \
2865          } \
2866          PARAM) \
2867    )
2868
2869 #define GENLIST_PART_LISTITEM(NAME, DESCRIPTION) \
2870    GENLIST_PART_TEXT(NAME, \
2871       DESCRIPTION \
2872       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2873    )
2874
2875 #define GENLIST_PART_LISTITEM_TB(NAME, DESCRIPTION) \
2876    GENLIST_PART_TEXTBLOCK(NAME, \
2877       DESCRIPTION \
2878       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2879    )
2880
2881 #define GENLIST_PART_LISTITEM_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2882    GENLIST_PART_TEXT(NAME, \
2883       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2884          min: 0 HEIGHT; \
2885          GENLIST_PARAM_LISTITEM \
2886          PARAM \
2887       ) \
2888       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2889    )
2890
2891 #define GENLIST_PART_LISTITEM_TB_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2892    GENLIST_PART_TEXTBLOCK(NAME, \
2893       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2894          min: 0 HEIGHT; \
2895          fixed: 1 0; \
2896          GENLIST_PARAM_LISTITEM_TB \
2897          PARAM \
2898       ) \
2899       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2900    )
2901
2902 #define GENLIST_PART_LISTITEM_LR(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
2903    GENLIST_PART_TEXT(NAME, \
2904       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
2905          min: 0 HEIGHT; \
2906          GENLIST_PARAM_LISTITEM \
2907          PARAM \
2908       ) \
2909       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2910    )
2911
2912 #define GENLIST_PART_LISTITEM_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP, PARAM) \
2913    GENLIST_PART_TEXT(NAME, \
2914       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
2915          min: 0 HEIGHT; \
2916          fixed: 0 1; \
2917          GENLIST_PARAM_LISTITEM \
2918          PARAM \
2919       ) \
2920       GENLIST_DESCRIPTION_LISTITEM_OTHERS \
2921    )
2922
2923 #define GENLIST_PART_LISTITEM_LRT_TB(NAME, HEIGHT, LEFT, RIGHT, TOP, PARAM) \
2924    GENLIST_PART_TEXTBLOCK(NAME, \
2925       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
2926          min: 0 HEIGHT; \
2927          fixed: 0 1; \
2928          GENLIST_PARAM_LISTITEM_TB \
2929          PARAM \
2930       ) \
2931       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2932    )
2933
2934 #define GENLIST_PART_LISTITEM_LR_TB(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
2935    GENLIST_PART_TEXTBLOCK(NAME, \
2936       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
2937          min: 0 HEIGHT; \
2938          fixed: 1 0; \
2939          GENLIST_PARAM_LISTITEM_TB \
2940          PARAM \
2941       ) \
2942       GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
2943    )
2944
2945 #define GENLIST_PART_SUBITEM_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
2946    GENLIST_PART_TEXT(NAME, \
2947       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2948          min: 0 HEIGHT; \
2949          GENLIST_PARAM_SUBITEM_DEFAULT \
2950          PARAM \
2951       ) \
2952       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2953    )
2954
2955 #define GENLIST_PART_SUBITEM(NAME, DESCRIPTION) \
2956    GENLIST_PART_TEXT(NAME, \
2957       DESCRIPTION \
2958       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2959    )
2960
2961 #define GENLIST_PART_SUBITEM_R(NAME, HEIGHT, RIGHT) \
2962    GENLIST_PART_TEXT(NAME, \
2963       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
2964          min: 0 HEIGHT; \
2965          fixed: 1 0; \
2966          GENLIST_PARAM_TEXT_LIMIT_RB \
2967          GENLIST_PARAM_SUBITEM_DEFAULT \
2968       ) \
2969       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2970    )
2971
2972 #define GENLIST_PART_SUBITEM_RB(NAME, HEIGHT, RIGHT, BOTTOM) \
2973    GENLIST_PART_TEXT(NAME, \
2974       GENLIST_DESCRIPTION_RB(RIGHT, BOTTOM, \
2975          min: 0 HEIGHT; \
2976          fixed: 1 1; \
2977          GENLIST_PARAM_TEXT_LIMIT_RB \
2978          GENLIST_PARAM_SUBITEM_DEFAULT \
2979       ) \
2980       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
2981    )
2982
2983 #define GENLIST_PART_SUBITEM_RB_TB(NAME, HEIGHT, RIGHT, BOTTOM) \
2984    GENLIST_PART_TEXTBLOCK(NAME, \
2985       GENLIST_DESCRIPTION_RB(RIGHT, BOTTOM, \
2986          min: 0 HEIGHT; \
2987          GENLIST_PARAM_TEXT_LIMIT_RB \
2988          fixed: 1 1; \
2989          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
2990       ) \
2991       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
2992    )
2993
2994 #define GENLIST_PART_SUBITEM_TB_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM) \
2995    GENLIST_PART_TEXTBLOCK(NAME, \
2996       GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
2997          min: 0 HEIGHT; \
2998          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
2999       ) \
3000       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3001    )
3002
3003 #define GENLIST_PART_SUBITEM_R_FIXED(NAME, WIDTH, HEIGHT, RIGHT) \
3004    GENLIST_PART_TEXT(NAME, \
3005       GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.top", "elm.padding.bottom", \
3006          min: WIDTH HEIGHT; \
3007          fixed: 1 1; \
3008          GENLIST_PARAM_SUBITEM_DEFAULT \
3009       ) \
3010       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3011    )
3012
3013 #define GENLIST_PART_SUBITEM_R_FIXED_TB(NAME, WIDTH, HEIGHT, RIGHT) \
3014    GENLIST_PART_TEXTBLOCK(NAME, \
3015        GENLIST_DESCRIPTION_R(RIGHT, \
3016          min: WIDTH HEIGHT; \
3017          fixed: 1 0; \
3018          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3019       ) \
3020       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3021    )
3022
3023 #define GENLIST_PART_SUBITEM_L_FIXED(NAME, WIDTH, HEIGHT, LEFT) \
3024    GENLIST_PART_TEXT(NAME, \
3025       GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.top", "elm.padding.bottom", \
3026          min: WIDTH HEIGHT; \
3027          fixed: 1 1; \
3028          GENLIST_PARAM_SUBITEM_DEFAULT \
3029       ) \
3030       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3031    )
3032
3033 #define GENLIST_PART_SUBITEM_LR(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
3034    GENLIST_PART_TEXT(NAME, \
3035       GENLIST_DESCRIPTION(LEFT, RIGHT, "elm.padding.top", "elm.padding.bottom", \
3036          min: 0 HEIGHT; \
3037          GENLIST_PARAM_SUBITEM_DEFAULT \
3038          PARAM \
3039       ) \
3040       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3041    )
3042
3043 #define GENLIST_PART_SUBITEM_LR_TB(NAME, HEIGHT, LEFT, RIGHT) \
3044    GENLIST_PART_TEXTBLOCK(NAME, \
3045       GENLIST_DESCRIPTION_LR(LEFT, RIGHT, \
3046          min: 0 HEIGHT; \
3047          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3048       ) \
3049       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3050    )
3051
3052 #define GENLIST_PART_SUBITEM_LB(NAME, HEIGHT, LEFT, RIGHT) \
3053    GENLIST_PART_TEXT(NAME, \
3054       GENLIST_DESCRIPTION_LB(LEFT, BOTTOM, \
3055          min: 0 HEIGHT; \
3056          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3057       ) \
3058       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3059    )
3060
3061 #define GENLIST_PART_SUBITEM_LRB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3062    GENLIST_PART_TEXT(NAME, \
3063       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3064          min: 0 HEIGHT; \
3065          GENLIST_PARAM_SUBITEM_DEFAULT \
3066          fixed: 0 1; \
3067       ) \
3068       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3069    )
3070
3071 #define GENLIST_PART_SUBITEM_SETTINGS_LRB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM, PARAM) \
3072    GENLIST_PART_TEXT(NAME, \
3073       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3074          min: 0 HEIGHT; \
3075          fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
3076          GENLIST_PARAM_SUBITEM_SETTINGS\
3077          PARAM; \
3078       ) \
3079       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
3080    )
3081
3082 #define GENLIST_PART_SUBITEM_LRB_TB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3083    GENLIST_PART_TEXTBLOCK(NAME, \
3084       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3085          min: 0 HEIGHT; \
3086          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3087          fixed: 0 1; \
3088       ) \
3089       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3090    )
3091
3092 #define GENLIST_PART_SUBITEM_SETTINGS_LRB_TB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
3093    GENLIST_PART_TEXTBLOCK(NAME, \
3094       GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
3095          min: 0 HEIGHT; \
3096          GENLIST_PARAM_SUBITEM_SETTINGS_TB \
3097          fixed: 0 1; \
3098       ) \
3099       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS_TB \
3100    )
3101
3102 #define GENLIST_PART_SUBITEM_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP) \
3103    GENLIST_PART_TEXT(NAME, \
3104       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
3105          min: 0 HEIGHT; \
3106          fixed: 0 1; \
3107          GENLIST_PARAM_SUBITEM_DEFAULT \
3108       ) \
3109       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3110    )
3111
3112 #define GENLIST_PART_SUBITEM_SETTINGS_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP) \
3113    GENLIST_PART_TEXT(NAME, \
3114       GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
3115          min: 0 HEIGHT; \
3116          fixed: 0 1; \
3117          GENLIST_PARAM_SUBITEM_SETTINGS \
3118       ) \
3119       GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
3120    )
3121
3122 #define GENLIST_PART_SUBITEM_LTB(NAME, HEIGHT, LEFT, TOP, BOTTOM) \
3123    GENLIST_PART_TEXT(NAME, \
3124       GENLIST_DESCRIPTION_LTB(LEFT, TOP, BOTTOM, \
3125          min: 0 HEIGHT; \
3126          fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
3127          GENLIST_PARAM_SUBITEM_DEFAULT \
3128       ) \
3129       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3130    )
3131
3132 #define GENLIST_PART_SUBITEM_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3133    GENLIST_PART_TEXT(NAME, \
3134       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3135          min: 0 HEIGHT; \
3136          GENLIST_PARAM_TEXT_LIMIT_RT \
3137          GENLIST_PARAM_SUBITEM_DEFAULT \
3138          fixed: 1 0; \
3139       ) \
3140       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3141    )
3142
3143 #define GENLIST_PART_SUBITEM_RTB_TB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3144    GENLIST_PART_TEXTBLOCK(NAME, \
3145       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3146          min: 0 HEIGHT; \
3147          GENLIST_PARAM_TEXT_LIMIT_RT \
3148          GENLIST_PARAM_SUBITEM_DEFAULT_TB \
3149          fixed: 1 0; \
3150       ) \
3151       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
3152    )
3153
3154 #define GENLIST_PART_SUBITEM_02_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3155    GENLIST_PART_TEXT(NAME, \
3156       GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3157          min: 0 HEIGHT; \
3158          GENLIST_PARAM_TEXT_LIMIT_RT \
3159          GENLIST_PARAM_SUBITEM_02 \
3160          fixed: 1 0; \
3161       ) \
3162       GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
3163    )
3164
3165 #define GENLIST_PARAM_LIST_BUBBLE_TEXT \
3166    color: GENLIST_LIST_BUBBLE_TEXT_COLOR; \
3167    text { \
3168       align: 1 0.5; \
3169       min: 0 1; \
3170       font: "Tizen:style=Bold"; \
3171       size: GENLIST_LIST_BUBBLE_TEXT_SIZE; \
3172       text_class: "tizen"; \
3173    }
3174
3175 // FIXME: Need to find why rel2.offset: 9 -1 will not fix the alignment of bubble text ?
3176 #define GENLIST_PART_LIST_BUBBLE_TEXT_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
3177          GENLIST_PART_IMAGE("elm.bubble", \
3178             mouse_events: 0; \
3179             GENLIST_DESCRIPTION_ENVELOP(NAME, \
3180                image { \
3181                   normal: "00_list_bubble_bg.png"; \
3182                   border: 8 8 0 0; \
3183                } \
3184                rel1.offset: -10 0; \
3185                rel2.offset: 8 -1; \
3186                min: 48 38; \
3187                max: -1 38; \
3188                fixed: 0 1; \
3189                color: GENLIST_LIST_BUBBLE_COLOR; \
3190             ) \
3191             description { state: "selected" 0.0; \
3192                inherit: "default" 0.0; \
3193                color: GENLIST_LIST_BUBBLE_PRESS_COLOR; \
3194             } \
3195          ) \
3196          GENLIST_PART_TEXT(NAME, \
3197             GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
3198                min: 0 HEIGHT; \
3199                GENLIST_PARAM_TEXT_LIMIT_RT \
3200                rel2.offset: -10 -1; /* This maintain the text alignment with bubble text. */\
3201                GENLIST_PARAM_LIST_BUBBLE_TEXT \
3202             ) \
3203             description { state: "selected" 0.0; \
3204                inherit: "default" 0.0; \
3205                color: GENLIST_LIST_BUBBLE_TEXT_FOCUS_COLOR; \
3206             } \
3207          )
3208
3209 #if 0
3210 #define GENLIST_PART_BASE__( param_item_height ) \
3211          part { name: "base"; \
3212             type: RECT; \
3213             repeat_events: 1; \
3214             scale: 1; \
3215             description { state: "default" 0.0; \
3216                min: 0 param_item_height; \
3217                color: LAYOUT_GROUP_LIST_BG_COLOR_INC; \
3218             } \
3219          }
3220
3221 /******************************************************************************/
3222 /** ETC
3223 /******************************************************************************/
3224 // FIXME: UX do not define selected state. But I thinkt that it is neededs :(
3225
3226 #define GENLIST_PROOGRAM_EXPAND(SRC, TARGET) \
3227    program { \
3228       name: "expand"; \
3229       signal: "mouse,clicked,1"; \
3230       source: SRC; \
3231       action: SIGNAL_EMIT "elm,action,expand,toggle" "elm"; \
3232    } \
3233    program { \
3234       name: "go_expanded"; \
3235       signal: "elm,state,expanded"; \
3236       source: "elm"; \
3237       action: STATE_SET "active" 0.0; \
3238       TARGET \
3239    } \
3240    program { \
3241       name: "go_contracted"; \
3242       signal: "elm,state,contracted"; \
3243       source: "elm"; \
3244       action: STATE_SET "default" 0.0; \
3245       TARGET \
3246    }
3247
3248 #define GENLIST_PART_BASE_LIST_H( HEIGHT) \
3249          part { name: "base"; \
3250             type: RECT; \
3251             repeat_events: 1; \
3252             scale: 1; \
3253             description { state: "default" 0.0; \
3254                align: 0.5 0.5; \
3255                color: 0 0 0 0; \
3256                rel2.relative: 1 0; \
3257                rel2.to: "bottom_line"; \
3258                min: 0 HEIGHT; \
3259             } \
3260          } \
3261          GENLIST_PART_BOTTOM_LINE
3262
3263 #define GENLIST_PART_DIALOGUE_ITEM \
3264          part { name: "elm.rect.dialogue"; \
3265             type: RECT; \
3266             scale: 1; \
3267             description { state: "default" 0.0; \
3268                min: 10 0; \
3269                fixed: 1 0; \
3270                color: GENLIST_DIALOGUE_GROUP_LEFT_BG_COLOR_INC; \
3271                rel2.relative: 0.0 1.0; \
3272                align: 0.0 0.0; \
3273             } \
3274          }
3275
3276 #define GENLIST_PART_DIALOGUE_RIGHT_LINE \
3277          part { name: "elm.rect.dialogue.right.line"; \
3278             type: RECT; \
3279             scale: 1; \
3280             description { state: "default" 0.0; \
3281                min: 1 0; \
3282                fixed: 1 0; \
3283                rel1 { \
3284                   relative: 1.0  0.0; \
3285                   offset: -1 0; \
3286                } \
3287                align: 1.0 0.0; \
3288                color: GENLIST_LIST_LINE1_COLOR; \
3289             } \
3290          }
3291
3292 #define GENLIST_PROGRAM_FLIP_1TEXT \
3293          program { name: "flipped"; \
3294             signal: "elm,state,flip,enabled"; \
3295             source: "elm"; \
3296             action: STATE_SET "flipped" 0.0; \
3297             target: "elm.text"; \
3298             target: "elm.flip.content"; \
3299          } \
3300          program { name: "flip_disabled"; \
3301             signal: "elm,state,flip,disabled"; \
3302             source: "elm"; \
3303             action: STATE_SET "default" 0.0; \
3304             target: "elm.text"; \
3305             target: "elm.flip.content"; \
3306          }
3307
3308 #define GENLIST_PROGRAM_FLIP_2TEXT \
3309          program { name: "flipped"; \
3310             signal: "elm,state,flip,enabled"; \
3311             source: "elm"; \
3312             action: STATE_SET "flipped" 0.0; \
3313             target: "elm.text.1"; \
3314             target: "elm.text.2"; \
3315             target: "elm.flip.content"; \
3316          } \
3317          program { name: "flip_disabled"; \
3318             signal: "elm,state,flip,disabled"; \
3319             source: "elm"; \
3320             action: STATE_SET "default" 0.0; \
3321             target: "elm.text.1"; \
3322             target: "elm.text.2"; \
3323             target: "elm.flip.content"; \
3324          }
3325
3326 #define GENLIST_PROGRAM_FLIP_2TEXT_1ICON \
3327          program { name: "flipped"; \
3328             signal: "elm,state,flip,enabled"; \
3329             source: "elm"; \
3330             action: STATE_SET "flipped" 0.0; \
3331             target: "elm.text.1"; \
3332             target: "elm.text.2"; \
3333             target: "elm.icon"; \
3334             target: "elm.flip.content"; \
3335          } \
3336          program { name: "flip_disabled"; \
3337             signal: "elm,state,flip,disabled"; \
3338             source: "elm"; \
3339             action: STATE_SET "default" 0.0; \
3340             target: "elm.text.1"; \
3341             target: "elm.text.2"; \
3342             target: "elm.icon"; \
3343             target: "elm.flip.content"; \
3344          }
3345
3346 #define GENLIST_PROGRAM_FLIP_2TEXT_2ICON \
3347          program { name: "flipped"; \
3348             signal: "elm,state,flip,enabled"; \
3349             source: "elm"; \
3350             action: STATE_SET "flipped" 0.0; \
3351             target: "elm.text.1"; \
3352             target: "elm.text.2"; \
3353             target: "elm.icon.1"; \
3354             target: "elm.icon.2"; \
3355             target: "elm.flip.content"; \
3356          } \
3357          program { name: "flip_disabled"; \
3358             signal: "elm,state,flip,disabled"; \
3359             source: "elm"; \
3360             action: STATE_SET "default" 0.0; \
3361              target: "elm.text.1"; \
3362             target: "elm.text.2"; \
3363             target: "elm.icon.1"; \
3364             target: "elm.icon.2"; \
3365             target: "elm.flip.content"; \
3366          }
3367
3368 #define GENLIST_PROGRAM_FLIP_3TEXT_2ICON \
3369          program { name: "flipped"; \
3370             signal: "elm,state,flip,enabled"; \
3371             source: "elm"; \
3372             action: STATE_SET "flipped" 0.0; \
3373             target: "elm.text.1"; \
3374             target: "elm.text.2"; \
3375             target: "elm.text.3"; \
3376             target: "elm.icon.1"; \
3377             target: "elm.icon.2"; \
3378             target: "elm.flip.content"; \
3379          } \
3380          program { name: "flip_disabled"; \
3381             signal: "elm,state,flip,disabled"; \
3382             source: "elm"; \
3383             action: STATE_SET "default" 0.0; \
3384             target: "elm.text.1"; \
3385             target: "elm.text.2"; \
3386             target: "elm.text.3"; \
3387             target: "elm.icon.1"; \
3388             target: "elm.icon.2"; \
3389             target: "elm.flip.content"; \
3390          }
3391
3392
3393 #define GENLIST_DESCRIPTION_INVISIBLE_SELECTED \
3394             description { state: "selected" 1.0; \
3395                inherit: "default" 0.0; \
3396                visible: 0; \
3397             }
3398
3399 #define GENLIST_DESCRIPTION_FLIP_ENABLED \
3400             description { state: "flipped" 0.0; \
3401                inherit: "default" 0.0; \
3402                visible: 0; \
3403             }
3404
3405 #define GENLIST_PROGRAM_SCRIPT_FLIP_SELECT_1TEXT \
3406             script { \
3407                new st[31]; \
3408                new Float:vl; \
3409                get_state(PART:"elm.text", st, 30, vl); \
3410                set_state(PART:"bg", "selected", 0.0); \
3411                if (!strcmp(st, "flipped")) \
3412                   set_state(PART:"elm.text", "selected", 1.0); \
3413                else \
3414                   set_state(PART:"elm.text", "selected", 0.0); \
3415             }
3416
3417
3418 /* genlist multisense macro - start */
3419 #define GENLIST_PROGRAM_AFTER_PLAY_BUTTON_PRESS \
3420             after: "play_button_press";
3421
3422 #define GENLIST_PROGRAM_PLAY_BUTTON_PRESS \
3423          program { name: "play_button_press"; \
3424             action: PLAY_SAMPLE "button-pressed" 1.0; \
3425          }
3426 #endif