2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #define GENLIST_PART_BASE( param_item_height ) \
19 part { name: "base"; \
23 description { state: "default" 0.0; \
24 min: 0 param_item_height; \
25 color: GENLIST_PART_BG_COLOR_INC; \
29 #define GENLIST_PART_BG \
34 description { state: "default" 0.0; \
35 color: GENLIST_PART_BG_COLOR_INC; \
37 description { state: "hide" 0.0; \
38 inherit: "default" 0.0; \
39 rel1 { relative: 0.025 0.0; } \
40 rel2 { relative: 1.025 1.0; } \
42 description { state: "hide" 0.1; \
43 inherit: "default" 0.0; \
44 rel1 { relative: 0.13 0.0; } \
45 rel2 { relative: 1.13 1.0; } \
47 description { state: "hide" 0.2; \
48 inherit: "default" 0.0; \
49 rel1 { relative: 0.5 0.0; } \
50 rel2 { relative: 1.5 1.0; } \
52 description { state: "hide" 0.3; \
53 inherit: "default" 0.0; \
54 rel1 { relative: 1.0 0.0; } \
55 rel2 { relative: 2.0 1.0; } \
59 #define GENLIST_PART_BG_IMAGE \
60 part { name: "bg_image"; \
64 description { state: "default" 0.0; \
65 color: GENLIST_PART_BG_UNSELECTED_COLOR_INC; \
67 description { state: "selected" 0.0; \
68 inherit: "default" 0.0; \
69 color: GENLIST_PART_BG_SELECTED_COLOR_INC; \
73 #define GENLIST_PART_BOTTOM_LINE \
74 part { name: "bottom_line"; \
77 description { state: "default" 0.0; \
81 color: GENLIST_PART_BOTTOM_LINE_INC; \
89 #define GENLIST_PART_BOTTOM_EFFECT_LINE \
90 part { name: "bottom_line"; \
93 description { state: "default" 0.0; \
97 color: GENLIST_PART_BOTTOM_LINE_INC; \
103 GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
104 GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
107 #define GENLIST_PART_PADDING_TOP( param_padding_size ) \
108 part { name: "elm.padding.top"; \
112 state: "default" 0.0; \
113 min: 0 param_padding_size; \
116 rel2.relative: 1.0 0.0; \
121 #define GENLIST_PART_PADDING_TEXT_TOP( param_padding_size ) \
122 part { name: "elm.padding.text.top"; \
126 state: "default" 0.0; \
127 min: 0 param_padding_size; \
130 rel2.relative: 1.0 0.0; \
135 #define GENLIST_PART_PADDING_BOTTOM( param_padding_size ) \
136 part { name: "elm.padding.bottom"; \
139 description { state: "default" 0.0; \
140 min: 0 param_padding_size; \
143 rel1.relative: 0.0 1.0; \
148 #define GENLIST_PART_PADDING_LEFT( param_padding_size ) \
149 part { name: "elm.padding.left"; \
152 description { state: "default" 0.0; \
153 min: param_padding_size 0; \
156 rel2.relative: 0.0 1.0; \
161 #define GENLIST_PART_PADDING_RIGHT( param_padding_size ) \
162 part { name: "elm.padding.right"; \
165 description { state: "default" 0.0; \
166 min: param_padding_size 0; \
169 rel1.relative: 1.0 0.0; \
174 #define GENLIST_PART_DIALOGUE_BASE( param_item_height ) \
175 part { name: "base"; \
177 clip_to: "disclip"; \
180 description { state: "default" 0.0; \
181 min: 0 param_item_height; \
182 color: LAYOUT_GROUP_LIST_BG_COLOR_INC; \
186 #define GENLIST_PART_DIALOGUE_ITEM \
187 part { name: "elm.rect.dialogue"; \
190 description { state: "default" 0.0; \
191 min: GENLIST_PADDING_16_INC 0; \
193 color: GENLIST_PART_DIALOGUE_INDICATOR_BG_COLOR_INC; \
194 rel2.relative: 0.0 1.0; \
199 #define GENLIST_PART_DIALOGUE_EXPANDABLE_ITEM \
200 part { name: "elm.rect.dialogue"; \
203 description { state: "default" 0.0; \
204 min: GENLIST_PADDING_16_INC 0; \
206 color: GENLIST_PART_DIALOGUE_INDICATOR_BG_COLOR_INC; \
207 rel2.relative: 0.0 1.0; \
210 GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
211 GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
214 #define GENLIST_PART_SWALLOW_END( param_padding_size ) \
215 part { name: "elm.padding.left.swallow.end";\
216 clip_to: "disclip"; \
219 description { state: "default" 0.0;\
220 min: param_padding_size 0;\
223 rel1.to_x: "elm.swallow.end";\
226 to_x: "elm.swallow.end";\
231 part { name: "elm.swallow.end";\
232 clip_to: "disclip"; \
235 description { state: "default" 0.0;\
238 rel1.to_x: "elm.padding.right";\
241 to_x: "elm.padding.right";\
246 #define GENLIST_PART_DISCLIP \
247 part { name: "disclip"; \
249 description { state: "default" 0.0; \
251 description { state: "disabled" 0.0; \
252 inherit: "default" 0.0; \
253 color: GENLIST_PART_DISCLIP_COLOR_INC; \
257 #define GENLIST_EXPANDABLE_PART_PERSPECTIVE_POINT() \
258 part { name: "point"; \
262 state: "default" 0.0; \
264 rel1 { relative: 0.0 0.0; } \
265 rel2 { relative: 1.0 0.0; } \
269 #define GENLIST_PART_MAP_START( param_x, param_y, param_z ) \
270 description { state: "map_transition" 0.0; \
271 inherit: "default" 0.0; \
272 color: 50 50 50 100; \
274 perspective: "point"; \
289 inherit: "default" 0.0; \
293 #define GENLIST_PART_MAP_FINISH( param_x, param_y, param_z ) \
295 state: "map_rotate" 0.0; \
296 inherit: "default" 0.0; \
298 perspective: "point"; \
312 #define GENLIST_PART_MAP_BASE( param_item_height ) \
313 part { name: "base"; \
317 description { state: "default" 0.0; \
318 min: 0 param_item_height; \
319 color: GENLIST_PART_BG_COLOR_INC; \
321 GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
322 GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
325 #define GENLIST_EXPANDABLE_PART_BASE( GE_HEIGHT , GE_COLOR ) \
326 part { name: "base"; \
330 description { state: "default" 0.0; \
334 description { state: "selected" 0.0; \
335 inherit: "default" 0.0; \
336 color: GENLIST_PART_BG_SELECTED_COLOR_INC; \
338 GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
339 GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
342 #define GENLIST_PROGRAM_MAP_ROTATE_EXPAND_START() \
343 name: "rotaion_transition"; \
344 signal: "flip_item"; \
345 action: STATE_SET "map_transition" 0.0; \
348 #define GENLIST_PROGRAM_MAP_ROTATE_EXPAND_FINISH( second ) \
350 action: STATE_SET "map_rotate" 0.0; \
351 transition: LINEAR second; \
352 after: "rotation_end";
354 #define GENLIST_PROGRAM_MAP_EXPAND_END() \
355 name: "rotation_end"; \
356 action: STATE_SET "default" 0.0;
358 #define GENLIST_PROGRAM_MAP_ROTATE_CONTRACT_START() \
359 name: "rotation_transition2"; \
360 signal: "elm,state,contract_flip"; \
361 action: STATE_SET "map_rotate" 0.0; \
364 #define GENLIST_PROGRAM_MAP_ROTATE_CONTRACT_FINISH( second ) \
366 action: STATE_SET "map_transition" 0.0; \
367 transition: LINEAR second; \
370 #define GENLIST_PROGRAM_MAP_CONTRACT_END() \
372 action: STATE_SET "hide" 0.0;
374 #define GENLIST_PART_EXPANDABLE2_NOSHADOW_BASE( param_item_height ) \
375 part { name: "base"; \
379 description { state: "default" 0.0; \
380 min: 0 param_item_height; \
381 color: GENLIST_EXPANDABLE2_NOSHADOW_BG_COLOR_INC; \
383 GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
384 GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
387 #define GENLIST_PART_EXPANDABLE_SWALLOW_PADDING \
388 part { name: "elm.swallow.pad"; \
390 description { state: "default" 0.0; \
395 to_x: "elm.padding.left"; \
397 rel2.to_x: "elm.padding.left"; \
399 GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
400 GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
403 #define GENLIST_PART_PADDING_LEFT_SLIDE( param_padding_size ) \
404 part { name: "elm.padding.left"; \
408 state: "default" 0.0; \
409 min: param_padding_size 0; \
412 rel1 { relative: 0.0 0.0; to: "bg"; } \
413 rel2 { relative: 0.0 1.0; to: "bg"; } \
419 #define GENLIST_PART_BUTTON( param_name, param_text_name, param_text, param_left, param_right, param_top, param_bottom ) \
420 part { name: param_name; \
422 description { state: "default" 0.0; \
424 rel1 { relative: param_left param_top; offset: 0 0; } \
425 rel2 { relative: param_right param_bottom; offset: -1 -1; } \
427 normal: "btn_normal.png"; \
428 border: 10 10 10 10; \
431 image.middle: SOLID; \
434 description { state: "selected" 0.0; \
435 inherit: "default" 0.0; \
437 normal: "btn_selected.png"; \
441 part { name: param_text_name; \
447 state: "default" 0.0; \
449 rel1 { relative: 0.0 0.0; to: param_name; } \
450 rel2 { relative: 1.0 1.0; to: param_name; } \
453 font: "SLP:style=Roman"; \
462 #define GENLIST_PROGRAM_BUTTON( param_name_focused, param_name_normal, param_part_name ) \
463 program { name: param_name_focused; \
464 source: param_part_name; \
465 signal: "mouse,down,1"; \
466 action: STATE_SET "selected" 0.0; \
467 target: param_part_name; \
469 program { name: param_name_normal; \
470 source: param_part_name; \
471 signal: "mouse,up,1"; \
472 action: STATE_SET "default" 0.0; \
473 target: param_part_name; \
476 #define GENLIST_PROGRAM_SLIDE_WITH_AFTER( param_name, param_state, param_next ) \
477 program { name: param_name; \
478 action: STATE_SET "hide" param_state; \
480 transition: LINEAR 0.3; \
484 #define GENLIST_PROGRAM_SLIDE( param_name, param_state_name, param_state_value ) \
485 program { name: param_name; \
486 action: STATE_SET param_state_name param_state_value; \
488 transition: LINEAR 0.3; \
491 #define DESC_FLIP_IMAGE( param_state_value, param_image_file_name ) \
492 description { state: "flipping" param_state_value; \
493 inherit: "default" 0.0; \
494 image { normal: param_image_file_name; } \
497 #define DESC_TEXT_HIDE( param_state_value ) \
498 description { state: "hide" param_state_value; \
499 inherit: "default" 0.0; \
500 color: 0 0 0 (255*(1-param_state_value/0.20)); \
503 #define GENLIST_EDIT_PART_BASE( param_item_height ) \
504 part { name: "base"; \
508 description { state: "default" 0.0; \
509 min: 0 param_item_height; \
514 #define GENLIST_PART_RENAME \
515 part { name: "elm.edit.rename"; \
516 clip_to: "disclip"; \
520 description { state: "default" 0.0; \
525 to_x: "elm.padding.left"; \
529 to_x: "elm.padding.right"; \
532 description { state: "rename_enabled" 0.0; \
533 inherit: "default" 0.0; \
538 #define GENLIST_DESCRIPTION_INVISIBLE_SELECTED \
539 description { state: "selected" 1.0; \
540 inherit: "default" 0.0; \
544 #define GENLIST_DESCRIPTION_RENAME_ENABLED \
545 description { state: "rename_enabled" 0.0; \
546 inherit: "default" 0.0; \
550 #define GENLIST_PROGRAM_SCRIPT_RENAME_SELECT_1TEXT \
554 get_state(PART:"elm.text", st, 30, vl); \
555 set_state(PART:"bg_image", "selected", 0.0); \
556 if (!strcmp(st, "rename_enabled")) \
557 set_state(PART:"elm.text", "selected", 1.0); \
559 set_state(PART:"elm.text", "selected", 0.0); \
562 #define GENLIST_PROGRAM_SCRIPT_RENAME_SELECT_2TEXT \
566 get_state(PART:"elm.text.1", st, 30, vl); \
567 set_state(PART:"bg_image", "selected", 0.0); \
568 if (!strcmp(st, "rename_enabled")) { \
569 set_state(PART:"elm.text.1", "selected", 1.0); \
570 set_state(PART:"elm.text.2", "selected", 1.0); \
573 set_state(PART:"elm.text.1", "selected", 0.0); \
574 set_state(PART:"elm.text.2", "selected", 0.0); \
578 #define GENLIST_PROGRAM_SCRIPT_RENAME_SELECT_3TEXT \
582 get_state(PART:"elm.text.1", st, 30, vl); \
583 set_state(PART:"bg_image", "selected", 0.0); \
584 if (!strcmp(st, "rename_enabled")) { \
585 set_state(PART:"elm.text.1", "selected", 1.0); \
586 set_state(PART:"elm.text.2", "selected", 1.0); \
587 set_state(PART:"elm.text.3", "selected", 1.0); \
590 set_state(PART:"elm.text.1", "selected", 0.0); \
591 set_state(PART:"elm.text.2", "selected", 0.0); \
592 set_state(PART:"elm.text.3", "selected", 0.0); \
596 #define GENLIST_PROGRAM_RENAME_1TEXT \
597 program { name: "rename_enabled"; \
598 signal: "elm,state,rename,enabled"; \
600 action: STATE_SET "rename_enabled" 0.0; \
601 target: "elm.text"; \
602 target: "elm.edit.rename"; \
604 program { name: "rename_disabled"; \
605 signal: "elm,state,rename,disabled"; \
607 action: STATE_SET "default" 0.0; \
608 target: "elm.text"; \
609 target: "elm.edit.rename"; \
612 #define GENLIST_PROGRAM_RENAME_1TEXT_1ICON \
613 program { name: "rename_enabled"; \
614 signal: "elm,state,rename,enabled"; \
616 action: STATE_SET "rename_enabled" 0.0; \
617 target: "elm.text"; \
618 target: "elm.icon"; \
619 target: "elm.edit.rename"; \
621 program { name: "rename_disabled"; \
622 signal: "elm,state,rename,disabled"; \
624 action: STATE_SET "default" 0.0; \
625 target: "elm.text"; \
626 target: "elm.icon"; \
627 target: "elm.edit.rename"; \
630 #define GENLIST_PROGRAM_RENAME_1TEXT_2ICON \
631 program { name: "rename_enabled"; \
632 signal: "elm,state,rename,enabled"; \
634 action: STATE_SET "rename_enabled" 0.0; \
635 target: "elm.text"; \
636 target: "elm.icon.1"; \
637 target: "elm.icon.2"; \
638 target: "elm.edit.rename"; \
640 program { name: "rename_disabled"; \
641 signal: "elm,state,rename,disabled"; \
643 action: STATE_SET "default" 0.0; \
644 target: "elm.text"; \
645 target: "elm.icon.1"; \
646 target: "elm.icon.2"; \
647 target: "elm.edit.rename"; \
650 #define GENLIST_PROGRAM_RENAME_1TEXT_3ICON \
651 program { name: "rename_enabled"; \
652 signal: "elm,state,rename,enabled"; \
654 action: STATE_SET "rename_enabled" 0.0; \
655 target: "elm.text"; \
656 target: "elm.icon.1"; \
657 target: "elm.icon.2"; \
658 target: "elm.icon.3"; \
659 target: "elm.edit.rename"; \
661 program { name: "rename_disabled"; \
662 signal: "elm,state,rename,disabled"; \
664 action: STATE_SET "default" 0.0; \
665 target: "elm.text"; \
666 target: "elm.icon.1"; \
667 target: "elm.icon.2"; \
668 target: "elm.icon.3"; \
669 target: "elm.edit.rename"; \
672 #define GENLIST_PROGRAM_RENAME_2TEXT \
673 program { name: "rename_enabled"; \
674 signal: "elm,state,rename,enabled"; \
676 action: STATE_SET "rename_enabled" 0.0; \
677 target: "elm.text.1"; \
678 target: "elm.text.2"; \
679 target: "elm.edit.rename"; \
681 program { name: "rename_disabled"; \
682 signal: "elm,state,rename,disabled"; \
684 action: STATE_SET "default" 0.0; \
685 target: "elm.text.1"; \
686 target: "elm.text.2"; \
687 target: "elm.edit.rename"; \
690 #define GENLIST_PROGRAM_RENAME_2TEXT_1ICON \
691 program { name: "rename_enabled"; \
692 signal: "elm,state,rename,enabled"; \
694 action: STATE_SET "rename_enabled" 0.0; \
695 target: "elm.text.1"; \
696 target: "elm.text.2"; \
697 target: "elm.icon"; \
698 target: "elm.edit.rename"; \
700 program { name: "rename_disabled"; \
701 signal: "elm,state,rename,disabled"; \
703 action: STATE_SET "default" 0.0; \
704 target: "elm.text.1"; \
705 target: "elm.text.2"; \
706 target: "elm.icon"; \
707 target: "elm.edit.rename"; \
710 #define GENLIST_PROGRAM_RENAME_2TEXT_2ICON \
711 program { name: "rename_enabled"; \
712 signal: "elm,state,rename,enabled"; \
714 action: STATE_SET "rename_enabled" 0.0; \
715 target: "elm.text.1"; \
716 target: "elm.text.2"; \
717 target: "elm.icon.1"; \
718 target: "elm.icon.2"; \
719 target: "elm.edit.rename"; \
721 program { name: "rename_disabled"; \
722 signal: "elm,state,rename,disabled"; \
724 action: STATE_SET "default" 0.0; \
725 target: "elm.text.1"; \
726 target: "elm.text.2"; \
727 target: "elm.icon.1"; \
728 target: "elm.icon.2"; \
729 target: "elm.edit.rename"; \
732 #define GENLIST_PROGRAM_RENAME_2TEXT_3ICON \
733 program { name: "rename_enabled"; \
734 signal: "elm,state,rename,enabled"; \
736 action: STATE_SET "rename_enabled" 0.0; \
737 target: "elm.text.1"; \
738 target: "elm.text.2"; \
739 target: "elm.icon.1"; \
740 target: "elm.icon.2"; \
741 target: "elm.icon.3"; \
742 target: "elm.edit.rename"; \
744 program { name: "rename_disabled"; \
745 signal: "elm,state,rename,disabled"; \
747 action: STATE_SET "default" 0.0; \
748 target: "elm.text.1"; \
749 target: "elm.text.2"; \
750 target: "elm.icon.1"; \
751 target: "elm.icon.2"; \
752 target: "elm.icon.3"; \
753 target: "elm.edit.rename"; \
756 #define GENLIST_PROGRAM_RENAME_3TEXT \
757 program { name: "rename_enabled"; \
758 signal: "elm,state,rename,enabled"; \
760 action: STATE_SET "rename_enabled" 0.0; \
761 target: "elm.text.1"; \
762 target: "elm.text.2"; \
763 target: "elm.text.3"; \
764 target: "elm.edit.rename"; \
766 program { name: "rename_disabled"; \
767 signal: "elm,state,rename,disabled"; \
769 action: STATE_SET "default" 0.0; \
770 target: "elm.text.1"; \
771 target: "elm.text.2"; \
772 target: "elm.text.3"; \
773 target: "elm.edit.rename"; \
776 #define GENLIST_PROGRAM_RENAME_3TEXT_1ICON \
777 program { name: "rename_enabled"; \
778 signal: "elm,state,rename,enabled"; \
780 action: STATE_SET "rename_enabled" 0.0; \
781 target: "elm.text.1"; \
782 target: "elm.text.2"; \
783 target: "elm.text.3"; \
784 target: "elm.icon"; \
785 target: "elm.edit.rename"; \
787 program { name: "rename_disabled"; \
788 signal: "elm,state,rename,disabled"; \
790 action: STATE_SET "default" 0.0; \
791 target: "elm.text.1"; \
792 target: "elm.text.2"; \
793 target: "elm.text.3"; \
794 target: "elm.icon"; \
795 target: "elm.edit.rename"; \
798 #define GENLIST_PROGRAM_RENAME_3TEXT_2ICON \
799 program { name: "rename_enabled"; \
800 signal: "elm,state,rename,enabled"; \
802 action: STATE_SET "rename_enabled" 0.0; \
803 target: "elm.text.1"; \
804 target: "elm.text.2"; \
805 target: "elm.text.3"; \
806 target: "elm.icon.1"; \
807 target: "elm.icon.2"; \
808 target: "elm.edit.rename"; \
810 program { name: "rename_disabled"; \
811 signal: "elm,state,rename,disabled"; \
813 action: STATE_SET "default" 0.0; \
814 target: "elm.text.1"; \
815 target: "elm.text.2"; \
816 target: "elm.text.3"; \
817 target: "elm.icon.1"; \
818 target: "elm.icon.2"; \
819 target: "elm.edit.rename"; \
822 #define GENLIST_PROGRAM_RENAME_3TEXT_3ICON \
823 program { name: "rename_enabled"; \
824 signal: "elm,state,rename,enabled"; \
826 action: STATE_SET "rename_enabled" 0.0; \
827 target: "elm.text.1"; \
828 target: "elm.text.2"; \
829 target: "elm.text.3"; \
830 target: "elm.icon.1"; \
831 target: "elm.icon.2"; \
832 target: "elm.icon.3"; \
833 target: "elm.edit.rename"; \
835 program { name: "rename_disabled"; \
836 signal: "elm,state,rename,disabled"; \
838 action: STATE_SET "default" 0.0; \
839 target: "elm.text.1"; \
840 target: "elm.text.2"; \
841 target: "elm.text.3"; \
842 target: "elm.icon.1"; \
843 target: "elm.icon.2"; \
844 target: "elm.icon.3"; \
845 target: "elm.edit.rename"; \