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