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