2 * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved
4 * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
9 * 1. Redistributions of source code must retain the above copyright notice, this
10 * list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
19 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 //****************************************************************************//
32 // ***************** EDJE description have 24 patterns **********************//
33 //**************************************************************************//
37 #define DESC_FROM_L( PARAM ) \
38 description { state: "default" 0.0;\
41 rel2.relative: 0.0 1.0; \
48 #define DESC_FROM_R( PARAM ) \
49 description { state: "default" 0.0;\
61 #define DESC_FROM_T( PARAM ) \
62 description { state: "default" 0.0;\
65 rel2.relative: 1.0 0.0; \
74 #define DESC_FROM_B( PARAM ) \
75 description { state: "default" 0.0;\
77 rel1.relative: 0.0 1.0; \
85 #define DESC_TO( PART, PARAM ) \
86 description { state: "default" 0.0;\
99 // ---------------------
100 // LEFT | HERE | RIGHT
101 // ---------------------
103 #define DESC_LRTB( LEFT, RIGHT, TOP, BOTTOM, PARAM ) \
104 description { state: "default" 0.0;\
118 // ---------------------
120 // ---------------------
121 #define DESC_L( LEFT, PARAM ) \
122 description { state: "default" 0.0;\
136 // ---------------------
138 // ---------------------
139 #define DESC_R( RIGHT, PARAM ) \
140 description { state: "default" 0.0;\
154 // --------------------------
155 // LEFT |--> HERE <--| RIGHT
156 // --------------------------
157 #define DESC_LR( LEFT, RIGHT, PARAM ) \
158 description { state: "default" 0.0;\
175 #define DESC_RTB( RIGHT, TOP, BOTTOM, PARAM ) \
176 description { state: "default" 0.0;\
191 // LEFT | HERE | RIGHT
192 // ---------------------
194 #define DESC_LRB( LEFT, RIGHT, BOTTOM, PARAM ) \
195 description { state: "default" 0.0;\
211 // ---------------------
212 // LEFT | HERE | RIGHT
213 #define DESC_LRT( LEFT, RIGHT, TOP, PARAM ) \
214 description { state: "default" 0.0;\
230 // ---------------------
232 #define DESC_LT( LEFT, TOP, PARAM ) \
233 description { state: "default" 0.0;\
249 // ---------------------
251 #define DESC_LB( LEFT, BOTTOM, PARAM ) \
252 description { state: "default" 0.0;\
268 // ---------------------
270 // ---------------------
272 #define DESC_LTB( LEFT, TOP, BOTTOM, PARAM ) \
273 description { state: "default" 0.0;\
289 // ---------------------
291 #define DESC_RT( RIGHT, TOP, PARAM ) \
292 description { state: "default" 0.0;\
307 // | HERE <-- | RIGHT
308 // ---------------------
310 #define DESC_RB( RIGHT, BOTTOM, PARAM ) \
311 description { state: "default" 0.0;\
331 #define DESC_TB( TOP, BOTTOM, PARAM ) \
332 description { state: "default" 0.0;\
349 #define DESC_T( TOP, PARAM ) \
350 description { state: "default" 0.0;\
367 #define DESC_B( BOTTOM, PARAM ) \
368 description { state: "default" 0.0;\
381 //****************************************************************************//
382 //******************************* Part Macros ********************************//
383 //****************************************************************************//
384 #define PART(TYPE, NAME, DESCRIPION) \
391 //****************************************************************************//
392 //**************************** Genlist Macros ********************************//
393 //****************************************************************************//
395 #define PROLOG_LIST \
396 data.item: "treesize" 0; \
397 data.item: "flips" "elm.flip.icon elm.flip.content"; \
399 #define PART_LIST_BG \
400 PART(RECT, "bg_clip", \
402 description { state: "default" 0.0; } \
403 description { state: "decorate" 0.0; \
404 inherit: "default" 0.0; \
407 description { state: "reorder" 0.0; \
408 inherit: "default" 0.0; \
411 description { state: "decorate_reorder" 0.0; \
412 inherit: "default" 0.0; \
417 clip_to: "bg_clip"; \
418 description { state: "default" 0.0; \
421 description { state: "selected" 0.0; \
422 inherit: "default" 0.0; \
423 color: 255 255 255 255; \
424 color_class: "B041P"; \
426 description { state: "disabled" 0.0; \
427 inherit: "default" 0.0; \
428 color: 255 255 255 255; \
429 color_class: "B0211D"; \
433 #define PART_LIST_BOTTOMLINE \
434 PART(RECT, "bottom_line_clip", \
435 description { state: "default" 0.0; } \
436 description { state: "hide" 0.0; \
437 inherit: "default" 0.0; \
440 description { state: "decorate" 0.0; \
441 inherit: "default" 0.0; \
444 description { state: "reorder" 0.0; \
445 inherit: "default" 0.0; \
448 description { state: "decorate_reorder" 0.0; \
449 inherit: "default" 0.0; \
452 description { state: "flipped" 0.0; \
453 inherit: "default" 0.0; \
457 PART(RECT, "bottom_line", \
459 clip_to: "bottom_line_clip"; \
460 description { state: "default" 0.0; \
465 color_class: "B0222"; \
466 rel1.offset: -1 -1; \
470 #define PART_LIST_BOTTOMLINE_OFF \
471 PART(RECT, "bottom_line_clip", \
472 description { state: "default" 0.0; \
475 description { state: "hide" 0.0; \
476 inherit: "default" 0.0; \
480 PART(RECT, "bottom_line", \
481 description { state: "default" 0.0; \
486 //**************************** Genlist PADDING *******************************//
487 #define DESC_LIST_PADDINGS \
488 description { state: "decorate" 0.0; \
489 inherit: "default" 0.0; \
493 description { state: "decorate_reorder" 0.0; \
494 inherit: "default" 0.0; \
498 description { state: "reorder" 0.0; \
499 inherit: "default" 0.0; \
504 #define PART_LIST_PADDINGS(LEFT_SIZE, RIGHT_SIZE, TOP_SIZE, BOTTOM_SIZE) \
505 PART(SWALLOW, "elm.swallow.pad", \
509 PART(SWALLOW, "elm.swallow.colorbar", \
511 DESC_L("elm.swallow.pad", ) \
513 PART(SPACER, "elm.padding.left", \
514 DESC_L("elm.swallow.pad", \
519 PART(SPACER, "elm.padding.right", \
522 max: RIGHT_SIZE -1; \
524 description { state: "decorate" 0.0; \
525 inherit: "default" 0.0; \
529 description { state: "decorate_reorder" 0.0; \
530 inherit: "default" 0.0; \
534 description { state: "reorder" 0.0; \
535 inherit: "default" 0.0; \
540 PART(SPACER, "elm.padding.top", \
546 PART(SPACER, "elm.padding.bottom", \
548 min: 0 BOTTOM_SIZE; \
549 max: -1 BOTTOM_SIZE; \
553 //*************************** Genlist Programs ****************************//
554 #define PROGRAM_LIST_DEFAULT( TARGET ) \
555 program { name: "default"; \
556 signal: "elm,state,default"; \
558 action: STATE_SET "default" 0.0; \
562 #define PROGRAM_LIST_DISABLE( TARGET ) \
563 program { name: "enabled"; \
564 signal: "elm,state,enabled"; \
566 action: STATE_SET "default" 0.0; \
569 program { name: "disabled"; \
570 signal: "elm,state,disabled"; \
572 action: STATE_SET "disabled" 0.0; \
576 #define PROGRAM_LIST_SELECT( TARGET ) \
577 program { name: "selected"; \
578 signal: "elm,state,selected"; \
580 action: STATE_SET "selected" 0.0; \
583 program { name: "unselected"; \
584 signal: "elm,state,unselected"; \
586 action: STATE_SET "default" 0.0; \
590 #define PROGRAM_LIST_SOUND \
591 program { name: "play_sound"; \
592 signal: "elm,state,clicked"; \
595 run_program(PROGRAM:"play_sample"); \
599 name: "play_sample"; \
600 action: RUN_PLUGIN "touch_sound"; \
603 #define PROGRAM_LIST_FOCUS \
604 program { name: "focused"; \
605 signal: "elm,state,focused"; \
607 action: STATE_SET "focused" 0.0; \
608 target: "focus_part"; \
610 program { name: "unfocused"; \
611 signal: "elm,state,unfocused"; \
613 action: STATE_SET "default" 0.0; \
614 target: "focus_part"; \
617 #define PROGRAM_LIST_FLIP \
618 program { name: "flip_enabled"; \
619 signal: "elm,state,flip,enabled"; \
621 transition: DECELERATE 0.5; \
622 action: STATE_SET "flipped" 0.0; \
623 target: "elm.flip.content"; \
624 target: "elm.flip.icon"; \
626 program { name: "flip_disabled"; \
627 signal: "elm,state,flip,disabled"; \
629 transition: DECELERATE 0.5; \
630 action: STATE_SET "default" 0.0; \
631 target: "elm.flip.content"; \
632 target: "elm.flip.icon"; \
634 program { name: "flip_enabled_bg"; \
635 signal: "elm,state,flip,enabled"; \
637 action: STATE_SET "flipped" 0.0; \
638 target: "elm.flip.bg"; \
640 program { name: "flip_disabled_bg"; \
641 signal: "elm,state,flip,disabled"; \
643 action: STATE_SET "default" 0.0; \
644 target: "elm.flip.bg"; \
647 #define PROGRAM_LIST_DECORATE( TARGET ) \
648 program { name: "decorate_enabled_effect_ef"; \
649 signal: "elm,state,decorate,enabled,effect";\
651 action: STATE_SET "decorate" 0.0;\
654 program { name: "decorate_disabled_effect_ef";\
655 signal: "elm,state,decorate,disabled,effect";\
657 action: STATE_SET "default" 0.0;\
660 program { name: "decorate_enabled_ef";\
661 signal: "elm,state,decorate,enabled";\
663 action: STATE_SET "decorate" 0.0;\
666 program { name: "decorate_disabled_ef";\
667 signal: "elm,state,decorate,disabled";\
669 action: STATE_SET "default" 0.0;\
673 #define PROGRAM_LIST_DECORATE_FX( TARGET ) \
674 program { name: "decorate_enabled_effect_ef"; \
675 signal: "elm,state,decorate,enabled,effect";\
677 transition: DECELERATE 0.5;\
678 action: STATE_SET "decorate" 0.0;\
681 program { name: "decorate_disabled_effect_ef";\
682 signal: "elm,state,decorate,disabled,effect";\
684 transition: ACCELERATE 0.5;\
685 action: STATE_SET "default" 0.0;\
688 program { name: "decorate_enabled_ef";\
689 signal: "elm,state,decorate,enabled";\
691 action: STATE_SET "decorate" 0.0;\
694 program { name: "decorate_disabled_ef";\
695 signal: "elm,state,decorate,disabled";\
697 action: STATE_SET "default" 0.0;\
701 #define PROGRAM_LIST_BOTTOMLINE \
702 program { name : "hide_bottomline"; \
703 signal: "elm,state,bottomline,hide"; \
705 action: STATE_SET "hide" 0.0; \
706 target: "bottom_line_clip"; \
708 program { name : "show_bottomline"; \
709 signal: "elm,state,bottomline,show"; \
711 action: STATE_SET "default" 0.0; \
712 target: "bottom_line_clip"; \
716 #define PROGRAMS_LIST( TARGET ) \
718 PROGRAM_LIST_DEFAULT( TARGET \
721 target: "bottom_line"; \
722 target: "bottom_line_clip"; \
723 target: "elm.padding.left"; \
724 target: "elm.padding.right"; \
726 PROGRAM_LIST_DISABLE( TARGET \
729 PROGRAM_LIST_SELECT( TARGET \
733 PROGRAM_LIST_DECORATE( \
736 target: "bottom_line"; \
737 target: "bottom_line_clip"; \
738 target: "elm.padding.left"; \
739 target: "elm.padding.right"; \
741 PROGRAM_LIST_BOTTOMLINE \
744 //******************************* Genlist TEXT ********************************//
745 #define PARAM_TEXT(STYLE, PARAM) \
752 #define DESCRIPIONS_TEXT(DISABLED, SELECTED) \
753 description { state: "disabled" 0.0; \
754 inherit: "default" 0.0; \
755 text.style: DISABLED; \
757 description { state: "selected" 0.0; \
758 inherit: "default" 0.0; \
759 text.style: SELECTED; \
762 //******************************* Genlist SWIPE ********************************//
763 #define SWIPE_TRANSIT SIN_FAC 0.667 0.8
765 #define SWIPE_THRESH_X 60
766 #define SWIPE_THRESH_Y 30
768 #define SWIPE_OVERLAP_SIZE 100
769 #define SWIPE_ICON_SIZE 64 100
771 // state: normal(0)->start,right( 1)->rollback,right ( 3), swipe,right ( 2)-> normal(0)
772 // ->start,left (-1)->rollback,right (-3), swipe,right (-2)->
773 #define SCRIPTS_LIST_SWIPE \
778 set_int(_state, 0); \
781 set_drag(PART:"drag_part", 0, 0); \
782 set_state(PART:"drag_part", "default", 0.0); \
783 set_state(PART:"drag_part_left", "default", 0.0); \
784 set_state(PART:"drag_part_right", "default", 0.0); \
785 set_state(PART:"elm.text.swipe.left", "default", 0.0); \
786 set_state(PART:"elm.text.swipe.right", "default", 0.0); \
787 set_state(PART:"elm.icon.swipe.left", "default", 0.0); \
788 set_state(PART:"elm.icon.swipe.right", "default", 0.0); \
789 set_state(PART:"swipe_temp_disabler", "default", 0.0); \
793 #define IMAGES_LIST_SWIPE \
794 image : "b_list_swipe_right.#.png" COMP; \
795 image : "b_list_swipe_left.#.png" COMP;
797 #define PARTS_LIST_SWIPE \
798 part { name: "drag_part"; \
806 description { state: "default" 0.0; \
808 rel1.offset: -SWIPE_OVERLAP_SIZE 0; \
809 rel2.offset: SWIPE_OVERLAP_SIZE 0; \
811 description { state: "disable" 0.0; \
812 inherit: "default" 0.0; \
813 color: 255 255 255 255; \
816 description { state: "start_right" 0.0; \
817 inherit: "default" 0.0; \
818 color: 255 255 255 255; \
819 color_class: "B041P"; \
821 description { state: "right_end" 0.0; \
822 inherit: "start_right"; \
823 rel1.relative: 1 0; \
825 description { state: "right_rollback" 0.0; \
826 inherit: "start_right" 0.0; \
827 rel1.relative: -1 0; \
830 description { state: "start_left" 0.0; \
831 inherit: "default" 0.0; \
832 color: 255 255 255 255; \
833 color_class: "B041P"; \
835 description { state: "left_end" 0.0; \
836 inherit: "start_left" 0.0; \
837 rel2.relative: 0 1; \
839 description { state: "left_rollback" 0.0; \
840 inherit: "start_left" 0.0; \
841 rel2.relative: 2 1; \
845 part { name: "drag_part_left"; \
849 description { state: "default" 0.0; \
857 offset: SWIPE_OVERLAP_SIZE 0; \
860 normal: "b_list_swipe_left.#.png"; \
863 description { state: "start_right" 0.0; \
864 inherit: "default" 0.0; \
865 color: 255 255 255 255; \
866 color_class: "B0242"; \
868 description { state: "start_left" 0.0; \
869 inherit: "default" 0.0; \
870 color: 255 255 255 255; \
871 color_class: "B0242"; \
874 part { name: "drag_part_right"; \
878 description { state: "default" 0.0; \
883 offset: -SWIPE_OVERLAP_SIZE 0; \
889 normal: "b_list_swipe_right.#.png"; \
892 description { state: "start_right" 0.0; \
893 inherit: "default" 0.0; \
894 color: 255 255 255 255; \
895 color_class: "B0241"; \
897 description { state: "start_left" 0.0; \
898 inherit: "default" 0.0; \
899 color: 255 255 255 255; \
900 color_class: "B0241"; \
903 part { name: "swipe_temp_disabler"; \
907 description { state: "default" 0.0; \
911 description { state: "enable" 0.0; \
912 inherit: "default"; \
916 part { name: "elm.icon.swipe.left"; \
918 clip_to: "elm.icon.swipe.clip"; \
921 description { state: "default" 0.0; \
924 to_x: "elm.padding.left"; \
928 to_x: "elm.padding.right"; \
933 min: SWIPE_ICON_SIZE; \
934 max: SWIPE_ICON_SIZE; \
936 description { state: "start_left" 0.0; \
937 inherit: "default" 0.0; \
939 color: 250 250 250 255; \
941 description { state: "start_right" 0.0; \
942 inherit: "default" 0.0; \
944 description { state: "right_rollback" 0.0; \
945 inherit: "default" 0.0; \
948 description { state: "left_rollback" 0.0; \
949 inherit: "default" 0.0; \
953 part { name: "elm.icon.swipe.right"; \
955 clip_to: "elm.icon.swipe.clip"; \
958 description { state: "default" 0.0; \
961 to_x: "elm.padding.right"; \
965 to_x: "elm.padding.right"; \
970 min: SWIPE_ICON_SIZE; \
971 max: SWIPE_ICON_SIZE; \
973 description { state: "start_right" 0.0; \
974 inherit: "default" 0.0; \
976 color: 250 250 250 255; \
978 description { state: "start_left" 0.0; \
979 inherit: "default" 0.0; \
981 description { state: "right_rollback" 0.0; \
982 inherit: "default" 0.0; \
985 description { state: "left_rollback" 0.0; \
986 inherit: "default" 0.0; \
990 part { name: "elm.icon.swipe.clip"; \
993 description { state: "default" 0.0; \
994 color_class: "F071"; \
997 part { name: "elm.text.swipe.left"; \
1001 description { state: "default" 0.0; \
1004 to_x: "elm.icon.swipe.left"; \
1008 description { state: "start_left" 0.0; \
1009 inherit: "default"; \
1012 color_class: "T025"; \
1016 text_class: "T025"; \
1019 description { state: "start_right" 0.0; \
1020 inherit: "default" 0.0; \
1023 part { name: "elm.text.swipe.right"; \
1027 description { state: "default" 0.0; \
1030 to_x: "elm.icon.swipe.right"; \
1034 description { state: "start_right" 0.0; \
1035 inherit: "default" 0.0; \
1038 color_class: "T025"; \
1042 text_class: "T025"; \
1046 description { state: "start_left" 0.0; \
1047 inherit: "default" 0.0; \
1051 #define PARTS_LIST_SWIPE_RIGHT \
1052 part { name: "drag_part"; \
1060 description { state: "default" 0.0; \
1062 rel1.offset: -SWIPE_OVERLAP_SIZE 0; \
1063 rel2.offset: SWIPE_OVERLAP_SIZE 0; \
1065 description { state: "disable" 0.0; \
1066 inherit: "default" 0.0; \
1069 description { state: "start_right" 0.0; \
1070 inherit: "default" 0.0; \
1071 color: 255 255 255 255; \
1072 color_class: "B041P"; \
1074 description { state: "right_end" 0.0; \
1075 inherit: "start_right"; \
1076 rel1.relative: 1 0; \
1078 description { state: "right_rollback" 0.0; \
1079 inherit: "start_right" 0.0; \
1080 rel1.relative: -1 0; \
1084 part { name: "drag_part_left"; \
1088 description { state: "default" 0.0; \
1094 to_x: "drag_part"; \
1096 offset: SWIPE_OVERLAP_SIZE 0; \
1099 normal: "b_list_swipe_left.#.png"; \
1102 description { state: "start_right" 0.0; \
1103 inherit: "default" 0.0; \
1104 color: 255 255 255 255; \
1105 color_class: "B0242"; \
1108 part { name: "drag_part_right"; \
1112 description { state: "default" 0.0; \
1115 to_x: "drag_part"; \
1117 offset: -SWIPE_OVERLAP_SIZE 0; \
1123 normal: "b_list_swipe_right.#.png"; \
1126 description { state: "start_right" 0.0; \
1127 inherit: "default" 0.0; \
1128 color: 255 255 255 255; \
1129 color_class: "B041P"; \
1132 part { name: "swipe_temp_disabler"; \
1136 description { state: "default" 0.0; \
1140 description { state: "enable" 0.0; \
1141 inherit: "default"; \
1145 part { name: "elm.icon.swipe.right"; \
1147 clip_to: "elm.icon.swipe.clip"; \
1150 description { state: "default" 0.0; \
1153 to_x: "elm.padding.right"; \
1157 to_x: "elm.padding.right"; \
1162 min: SWIPE_ICON_SIZE; \
1163 max: SWIPE_ICON_SIZE; \
1165 description { state: "start_right" 0.0; \
1166 inherit: "default" 0.0; \
1168 color: 250 250 250 255; \
1170 description { state: "right_rollback" 0.0; \
1171 inherit: "default" 0.0; \
1175 part { name: "elm.icon.swipe.clip"; \
1178 description { state: "default" 0.0; \
1179 color_class: "F071"; \
1182 part { name: "elm.text.swipe.right"; \
1186 description { state: "default" 0.0; \
1189 to_x: "elm.icon.swipe.right"; \
1193 description { state: "start_right" 0.0; \
1194 inherit: "default" 0.0; \
1197 color_class: "T025"; \
1201 text_class: "T025"; \
1207 #define PARTS_LIST_SWIPE_LEFT \
1208 part { name: "drag_part"; \
1216 description { state: "default" 0.0; \
1218 rel1.offset: -SWIPE_OVERLAP_SIZE 0; \
1219 rel2.offset: SWIPE_OVERLAP_SIZE 0; \
1221 description { state: "disable" 0.0; \
1222 inherit: "default" 0.0; \
1225 description { state: "start_left" 0.0; \
1226 inherit: "default" 0.0; \
1227 color: 255 255 255 255; \
1228 color_class: "B041P"; \
1230 description { state: "left_end" 0.0; \
1231 inherit: "start_left" 0.0; \
1232 rel2.relative: 0 1; \
1234 description { state: "left_rollback" 0.0; \
1235 inherit: "start_left" 0.0; \
1236 rel2.relative: 2 1; \
1240 part { name: "drag_part_left"; \
1244 description { state: "default" 0.0; \
1250 to_x: "drag_part"; \
1252 offset: SWIPE_OVERLAP_SIZE 0; \
1255 normal: "b_list_swipe_left.#.png"; \
1258 description { state: "start_left" 0.0; \
1259 inherit: "default" 0.0; \
1260 color: 255 255 255 255; \
1261 color_class: "B041P"; \
1264 part { name: "drag_part_right"; \
1268 description { state: "default" 0.0; \
1271 to_x: "drag_part"; \
1273 offset: -SWIPE_OVERLAP_SIZE 0; \
1279 normal: "b_list_swipe_right.#.png"; \
1282 description { state: "start_left" 0.0; \
1283 inherit: "default" 0.0; \
1284 color: 255 255 255 255; \
1285 color_class: "B0241"; \
1288 part { name: "swipe_temp_disabler"; \
1292 description { state: "default" 0.0; \
1296 description { state: "enable" 0.0; \
1297 inherit: "default"; \
1301 part { name: "elm.icon.swipe.left"; \
1303 clip_to: "elm.icon.swipe.clip"; \
1306 description { state: "default" 0.0; \
1309 to_x: "elm.padding.left"; \
1313 to_x: "elm.padding.right"; \
1318 min: SWIPE_ICON_SIZE; \
1319 max: SWIPE_ICON_SIZE; \
1321 description { state: "start_left" 0.0; \
1322 inherit: "default" 0.0; \
1324 color: 250 250 250 255; \
1326 description { state: "left_rollback" 0.0; \
1327 inherit: "default" 0.0; \
1331 part { name: "elm.icon.swipe.clip"; \
1334 description { state: "default" 0.0; \
1335 color_class: "F071"; \
1338 part { name: "elm.text.swipe.left"; \
1342 description { state: "default" 0.0; \
1345 to_x: "elm.icon.swipe.left"; \
1349 description { state: "start_left" 0.0; \
1350 inherit: "default"; \
1353 color_class: "T025"; \
1357 text_class: "T025"; \
1362 #define PROGRAMS_LIST_SWIPE \
1363 program { name: "drag_up"; \
1364 signal: "mouse,up,1"; \
1365 source: "drag_part"; \
1367 new x, y, w, h, ww, hh; \
1368 get_geometry(PART:"bg", x, y, ww, hh); \
1369 get_geometry(PART:"drag_part", x, y, w, h); \
1370 x = x + SWIPE_OVERLAP_SIZE; \
1371 if (get_int(_state) == 1) { \
1372 if (x >= (ww/2)) { \
1373 set_int(_state, 3); \
1374 set_state(PART:"swipe_temp_disabler", "enable", 0.0); \
1375 run_program(PROGRAM:"end_move_right"); \
1377 set_int(_state, 2); \
1378 set_state(PART:"swipe_temp_disabler", "enable", 0.0); \
1379 set_state(PART:"elm.text.swipe.right", "default", 0.0); \
1380 set_state(PART:"elm.text.swipe.left", "default", 0.0); \
1381 run_program(PROGRAM:"end_rollback_right"); \
1383 } else if (get_int(_state) == -1) { \
1384 if (-x >= (ww/2)) { \
1385 set_int(_state, -3); \
1386 set_state(PART:"swipe_temp_disabler", "enable", 0.0); \
1387 run_program(PROGRAM:"end_move_left"); \
1389 set_int(_state, -2); \
1390 set_state(PART:"swipe_temp_disabler", "enable", 0.0); \
1391 set_state(PART:"elm.text.swipe.right", "default", 0.0); \
1392 set_state(PART:"elm.text.swipe.left", "default", 0.0); \
1393 run_program(PROGRAM:"end_rollback_left"); \
1398 program { name: "drag_down"; \
1399 signal: "mouse,down,1"; \
1400 source: "drag_part"; \
1404 set_int(_state, 0); \
1409 program { name: "drag"; \
1411 source: "drag_part"; \
1414 get_mouse(x2, y2); \
1415 if (((y2 - get_int(y1)) >= SWIPE_THRESH_Y) || \
1416 ((y2 - get_int(y1)) <= -SWIPE_THRESH_Y)) \
1418 if (get_int(_state) == 0) { \
1419 if ((x2 - get_int(x1)) >= SWIPE_THRESH_X) { \
1420 emit("elm,swipe,start", ""); \
1421 set_int(_state, 1); \
1422 run_program(PROGRAM:"start_right"); \
1423 } else if ((x2 - get_int(x1)) <= -SWIPE_THRESH_X) { \
1424 emit("elm,swipe,start", ""); \
1425 set_int(_state, -1); \
1426 run_program(PROGRAM:"start_left"); \
1428 } else if (get_int(_state) == -1) { \
1429 if (x2 > get_int(x1)) { \
1430 set_int(_state, 1); \
1431 run_program(PROGRAM:"start_right"); \
1433 } else if (get_int(_state) == 1) { \
1434 if (x2 < get_int(x1)) { \
1435 set_int(_state, -1); \
1436 run_program(PROGRAM:"start_left"); \
1441 program { name: "start_right"; \
1442 action: STATE_SET "start_right" 0.0; \
1443 target: "elm.icon.swipe.right"; \
1444 target: "elm.icon.swipe.left"; \
1445 target: "elm.text.swipe.right"; \
1446 target: "elm.text.swipe.left"; \
1447 target: "drag_part"; \
1448 target: "drag_part_left"; \
1449 target: "drag_part_right"; \
1451 program { name: "start_left"; \
1452 action: STATE_SET "start_left" 0.0; \
1453 target: "elm.icon.swipe.right"; \
1454 target: "elm.icon.swipe.left"; \
1455 target: "elm.text.swipe.right"; \
1456 target: "elm.text.swipe.left"; \
1457 target: "drag_part"; \
1458 target: "drag_part_left"; \
1459 target: "drag_part_right"; \
1461 program { name: "end_move_right"; \
1462 transition: SWIPE_TRANSIT; \
1463 action: STATE_SET "right_end" 0.0; \
1464 target: "drag_part"; \
1465 after: "right_ender"; \
1467 program { name: "end_move_left"; \
1468 transition: SWIPE_TRANSIT; \
1469 action: STATE_SET "left_end" 0.0; \
1470 target: "drag_part"; \
1471 after: "left_ender"; \
1473 program { name: "end_rollback_right"; \
1474 action: STATE_SET "right_rollback" 0.0; \
1475 target: "elm.icon.swipe.right"; \
1476 target: "elm.icon.swipe.left"; \
1477 after: "end_rollback_right_transit"; \
1479 program { name: "end_rollback_right_transit"; \
1480 transition: SWIPE_TRANSIT; \
1481 action: STATE_SET "right_rollback" 0.0; \
1482 target: "drag_part"; \
1483 after: "rollback_ender"; \
1485 program { name: "end_rollback_left"; \
1486 action: STATE_SET "left_rollback" 0.0; \
1487 target: "elm.icon.swipe.right"; \
1488 target: "elm.icon.swipe.left"; \
1489 after: "end_rollback_left_transit"; \
1491 program { name: "end_rollback_left_transit"; \
1492 transition: SWIPE_TRANSIT; \
1493 action: STATE_SET "left_rollback" 0.0; \
1494 target: "drag_part"; \
1495 after: "rollback_ender"; \
1497 program { name: "right_ender"; \
1499 emit("elm,swipe,stop,right", ""); \
1503 program { name: "left_ender"; \
1505 emit("elm,swipe,stop,left", ""); \
1509 program { name: "rollback_ender"; \
1512 emit("elm,swipe,stop", ""); \
1516 program { name: "swipe_revert"; \
1517 signal: "elm,swipe,revert"; \
1520 if (get_int(_state) != 0) { \
1521 emit("elm,swipe,stop", ""); \
1526 program { name: "swipe_disable"; \
1527 signal: "elm,swipe,disabled"; \
1530 if (get_int(_state) != 0) { \
1531 emit("elm,swipe,stop", ""); \
1534 set_state(PART:"drag_part", "disable", 0.0); \
1537 program { name: "swipe_enable"; \
1538 signal: "elm,swipe,enabled"; \
1541 if (get_int(_state) != 0) { \
1542 emit("elm,swipe,stop", ""); \
1545 set_state(PART:"drag_part", "default", 0.0); \
1548 program { name: "swipe_default"; \
1549 signal: "elm,state,default"; \
1552 run_program(PROGRAM:"swipe_enable"); \
1555 program { name: "swipe_disable_state"; \
1556 signal: "elm,state,disabled"; \
1559 run_program(PROGRAM:"swipe_disable"); \
1563 #define PROGRAMS_LIST_SWIPE_RIGHT \
1564 program { name: "drag_up"; \
1565 signal: "mouse,up,1"; \
1566 source: "drag_part"; \
1568 new x, y, w, h, ww, hh; \
1569 get_geometry(PART:"bg", x, y, ww, hh); \
1570 get_geometry(PART:"drag_part", x, y, w, h); \
1571 x = x + SWIPE_OVERLAP_SIZE; \
1572 if (get_int(_state) == 1) { \
1573 if (x >= (ww/2)) { \
1574 set_int(_state, 3); \
1575 set_state(PART:"swipe_temp_disabler", "enable", 0.0); \
1576 run_program(PROGRAM:"end_move_right"); \
1578 set_int(_state, 2); \
1579 set_state(PART:"swipe_temp_disabler", "enable", 0.0); \
1580 set_state(PART:"elm.text.swipe.right", "default", 0.0); \
1581 set_state(PART:"elm.text.swipe.left", "default", 0.0); \
1582 run_program(PROGRAM:"end_rollback_right"); \
1587 program { name: "drag_down"; \
1588 signal: "mouse,down,1"; \
1589 source: "drag_part"; \
1593 set_int(_state, 0); \
1598 program { name: "drag"; \
1600 source: "drag_part"; \
1603 get_mouse(x2, y2); \
1604 if (((y2 - get_int(y1)) >= SWIPE_THRESH_Y) || \
1605 ((y2 - get_int(y1)) <= -SWIPE_THRESH_Y)) \
1607 if (get_int(_state) == 0) { \
1608 if ((x2 - get_int(x1)) >= SWIPE_THRESH_X) { \
1609 emit("elm,swipe,start", ""); \
1610 set_int(_state, 1); \
1611 run_program(PROGRAM:"start_right"); \
1616 program { name: "start_right"; \
1617 action: STATE_SET "start_right" 0.0; \
1618 target: "elm.icon.swipe.right"; \
1619 target: "elm.text.swipe.right"; \
1620 target: "drag_part"; \
1621 target: "drag_part_left"; \
1622 target: "drag_part_right"; \
1624 program { name: "end_move_right"; \
1625 transition: SWIPE_TRANSIT; \
1626 action: STATE_SET "right_end" 0.0; \
1627 target: "drag_part"; \
1628 after: "right_ender"; \
1630 program { name: "end_rollback_right"; \
1631 action: STATE_SET "right_rollback" 0.0; \
1632 target: "elm.icon.swipe.right"; \
1633 after: "end_rollback_right_transit"; \
1635 program { name: "end_rollback_right_transit"; \
1636 transition: SWIPE_TRANSIT; \
1637 action: STATE_SET "right_rollback" 0.0; \
1638 target: "drag_part"; \
1639 after: "rollback_ender"; \
1641 program { name: "right_ender"; \
1643 emit("elm,swipe,stop,right", ""); \
1647 program { name: "rollback_ender"; \
1650 emit("elm,swipe,stop", ""); \
1654 program { name: "swipe_revert"; \
1655 signal: "elm,swipe,revert"; \
1658 if (get_int(_state) != 0) { \
1659 emit("elm,swipe,stop", ""); \
1664 program { name: "swipe_disable"; \
1665 signal: "elm,swipe,disabled"; \
1668 if (get_int(_state) != 0) { \
1669 emit("elm,swipe,stop", ""); \
1672 set_state(PART:"drag_part", "disable", 0.0); \
1675 program { name: "swipe_enable"; \
1676 signal: "elm,swipe,enabled"; \
1679 if (get_int(_state) != 0) { \
1680 emit("elm,swipe,stop", ""); \
1683 set_state(PART:"drag_part", "default", 0.0); \
1686 program { name: "swipe_default"; \
1687 signal: "elm,state,default"; \
1690 run_program(PROGRAM:"swipe_enable"); \
1693 program { name: "swipe_disable_state"; \
1694 signal: "elm,state,disabled"; \
1697 run_program(PROGRAM:"swipe_disable"); \
1701 #define PROGRAMS_LIST_SWIPE_LEFT \
1702 program { name: "drag_up"; \
1703 signal: "mouse,up,1"; \
1704 source: "drag_part"; \
1706 new x, y, w, h, ww, hh; \
1707 get_geometry(PART:"bg", x, y, ww, hh); \
1708 get_geometry(PART:"drag_part", x, y, w, h); \
1709 x = x + SWIPE_OVERLAP_SIZE; \
1710 if (get_int(_state) == -1) { \
1711 if (-x >= (ww/2)) { \
1712 set_int(_state, -3); \
1713 set_state(PART:"swipe_temp_disabler", "enable", 0.0); \
1714 run_program(PROGRAM:"end_move_left"); \
1716 set_int(_state, -2); \
1717 set_state(PART:"swipe_temp_disabler", "enable", 0.0); \
1718 set_state(PART:"elm.text.swipe.left", "default", 0.0); \
1719 run_program(PROGRAM:"end_rollback_left"); \
1724 program { name: "drag_down"; \
1725 signal: "mouse,down,1"; \
1726 source: "drag_part"; \
1730 set_int(_state, 0); \
1735 program { name: "drag"; \
1737 source: "drag_part"; \
1740 get_mouse(x2, y2); \
1741 if (((y2 - get_int(y1)) >= SWIPE_THRESH_Y) || \
1742 ((y2 - get_int(y1)) <= -SWIPE_THRESH_Y)) \
1744 if (get_int(_state) == 0) { \
1745 if ((x2 - get_int(x1)) <= -SWIPE_THRESH_X) { \
1746 emit("elm,swipe,start", ""); \
1747 set_int(_state, -1); \
1748 run_program(PROGRAM:"start_left"); \
1753 program { name: "start_left"; \
1754 action: STATE_SET "start_left" 0.0; \
1755 target: "elm.icon.swipe.left"; \
1756 target: "elm.text.swipe.left"; \
1757 target: "drag_part"; \
1758 target: "drag_part_left"; \
1760 program { name: "end_move_left"; \
1761 transition: SWIPE_TRANSIT; \
1762 action: STATE_SET "left_end" 0.0; \
1763 target: "drag_part"; \
1764 after: "left_ender"; \
1766 program { name: "end_rollback_left"; \
1767 action: STATE_SET "left_rollback" 0.0; \
1768 target: "elm.icon.swipe.left"; \
1769 after: "end_rollback_left_transit"; \
1771 program { name: "end_rollback_left_transit"; \
1772 transition: SWIPE_TRANSIT; \
1773 action: STATE_SET "left_rollback" 0.0; \
1774 target: "drag_part"; \
1775 after: "rollback_ender"; \
1777 program { name: "left_ender"; \
1779 emit("elm,swipe,stop,left", ""); \
1783 program { name: "rollback_ender"; \
1786 emit("elm,swipe,stop", ""); \
1790 program { name: "swipe_revert"; \
1791 signal: "elm,swipe,revert"; \
1794 if (get_int(_state) != 0) { \
1795 emit("elm,swipe,stop", ""); \
1800 program { name: "swipe_disable"; \
1801 signal: "elm,swipe,disabled"; \
1804 if (get_int(_state) != 0) { \
1805 emit("elm,swipe,stop", ""); \
1808 set_state(PART:"drag_part", "disable", 0.0); \
1811 program { name: "swipe_enable"; \
1812 signal: "elm,swipe,enabled"; \
1815 if (get_int(_state) != 0) { \
1816 emit("elm,swipe,stop", ""); \
1819 set_state(PART:"drag_part", "default", 0.0); \
1822 program { name: "swipe_default"; \
1823 signal: "elm,state,default"; \
1826 run_program(PROGRAM:"swipe_enable"); \
1829 program { name: "swipe_disable_state"; \
1830 signal: "elm,state,disabled"; \
1833 run_program(PROGRAM:"swipe_disable"); \
1839 #define SCRIPTS_LIST_SWEEP \
1844 #define PARTS_LIST_SWEEP \
1845 PART(RECT, "bg.sweep",\
1846 description { state: "default" 0.0;\
1847 color_class: "B0232";\
1848 rel1.relative: -1.0 0.0;\
1849 rel2.relative: 0.0 1.0;\
1852 description { state: "default_r" 0.0;\
1853 inherit: "default" 0.0;\
1854 rel1.relative: 1.0 0.0;\
1855 rel2.relative: 2.0 1.0;\
1858 description { state: "visible" 0.0;\
1859 inherit: "default" 0.0;\
1860 rel1.relative: 0.0 0.0;\
1861 rel2.relative: 1.0 1.0;\
1865 PART(TEXTBLOCK, "elm.text.sweep",\
1866 description { state: "default" 0.0;\
1867 rel1.to_x: "bg.sweep";\
1868 rel2.to_x: "elm.divider.sweep.left.padding";\
1869 rel2.relative: 0.0 1.0;\
1870 PARAM_TEXT("list_sweep_style",)\
1873 description { state: "visible" 0.0;\
1874 inherit: "default" 0.0;\
1878 PART(SPACER, "elm.divider.sweep.left.padding",\
1879 DESC_R("elm.divider.sweep",\
1880 min: LIST_DIVIDER_PADDING_SIZE 0;\
1881 max: LIST_DIVIDER_PADDING_SIZE -1;\
1884 PART(SWALLOW, "elm.icon.sweep",\
1886 min: BUTTON_DIVIDER_BTN_SIZE 0;\
1887 max: BUTTON_DIVIDER_BTN_SIZE -1;\
1888 rel1.to: "bg.sweep";\
1889 rel2.to: "bg.sweep";\
1892 description { state: "visible" 0.0;\
1893 inherit: "default" 0.0;\
1897 PART(RECT, "elm.divider.sweep",\
1898 DESC_R("elm.icon.sweep",\
1901 min: 2 LIST_DIVIDER_HEIGHT;\
1902 max: 2 LIST_DIVIDER_HEIGHT;\
1905 description { state: "visible" 0.0;\
1906 inherit: "default" 0.0;\
1911 #define PROGRAMS_LIST_SWEEP \
1912 program { name: "sweep_default"; \
1913 signal: "elm,state,default"; \
1915 action: STATE_SET "default" 0.0;\
1916 target: "bg.sweep";\
1917 target: "elm.icon.sweep";\
1918 target: "elm.text.sweep";\
1919 target: "elm.divider.sweep";\
1921 program { name: "sweep_right_show";\
1922 signal: "elm,state,sweep,right";\
1925 set_int(dir_right, 1);\
1926 set_state(PART:"bg.sweep", "default", 0.0);\
1927 run_program(PROGRAM:"sweep_show");\
1930 program { name: "sweep_left_show";\
1931 signal: "elm,state,sweep,left";\
1934 set_int(dir_right, 0);\
1935 set_state(PART:"bg.sweep", "default_r", 0.0);\
1936 run_program(PROGRAM:"sweep_show");\
1939 program { name: "sweep_show";\
1940 action: STATE_SET "visible" 0.0;\
1941 transition: DECELERATE 0.5;\
1942 target: "bg.sweep";\
1943 target: "elm.icon.sweep";\
1944 target: "elm.text.sweep";\
1945 target: "elm.divider.sweep";\
1947 program { name: "sweep_hide";\
1948 signal: "elm,state,sweep,hide";\
1951 if (get_int(dir_right)) {\
1952 run_program(PROGRAM:"sweep_left_hide");\
1954 run_program(PROGRAM:"sweep_right_hide");\
1958 program { name: "sweep_left_hide"; \
1959 action: STATE_SET "default" 0.0;\
1960 transition: DECELERATE 0.5;\
1961 target: "bg.sweep";\
1962 target: "elm.icon.sweep";\
1963 target: "elm.text.sweep";\
1964 target: "elm.divider.sweep";\
1966 program { name: "sweep_right_hide"; \
1967 action: STATE_SET "default_r" 0.0;\
1968 transition: DECELERATE 0.5;\
1969 target: "bg.sweep";\
1970 target: "elm.icon.sweep";\
1971 target: "elm.text.sweep";\
1972 target: "elm.divider.sweep";\