2 * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved
4 * PROPRIETARY/CONFIDENTIAL
6 * This software is the confidential and proprietary information of SAMSUNG
7 * ELECTRONICS ("Confidential Information"). You agree and acknowledge that this
8 * software is owned by Samsung and you shall not disclose such Confidential
9 * Information and shall use it only in accordance with the terms of the license
10 * agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no
11 * representations or warranties about the suitability of the software, either
12 * express or implied, including but not limited to the implied warranties of
13 * merchantability, fitness for a particular purpose, or non-infringement.
14 * SAMSUNG shall not be liable for any damages suffered by licensee arising out
15 * of or releated to this software.
19 #include "multisense_sound.edc"
20 #include "multisense_haptic.edc"
25 ///////////////////////////////////////////////////////////////////////////////////////
26 group { name: "elm/button/base/sound_dark";
28 image: "00_button_02_normal.png" COMP;
29 image: "00_button_02_press.png" COMP;
30 image: "00_button_02_focus.png" COMP;
33 public button_state = 0; //0:enabled, 1: disabled
36 part { name: "button_image";
39 description { state: "default" 0.0;
42 normal: "00_button_02_normal.png";
47 description { state: "clicked" 0.0;
48 inherit: "default" 0.0;
49 image.normal: "00_button_02_press.png";
51 description { state: "disabled" 0.0;
52 inherit: "default" 0.0;
54 description { state: "focused" 0.0;
55 inherit: "default" 0.0;
56 image.normal: "00_button_02_focus.png";
64 description { state: "default" 0.0;
66 rel1.relative: 0.0 0.0;
67 rel2.relative: 0.0 1.0;
74 name: "padding_right";
78 description { state: "default" 0.0;
80 rel1.relative: 1.0 0.0;
81 rel2.relative: 1.0 1.0;
92 description { state: "default" 0.0;
94 rel1.relative: 0.0 0.0;
95 rel2.relative: 1.0 0.0;
102 name: "padding_bottom";
106 description { state: "default" 0.0;
108 rel1.relative: 0.0 1.0;
109 rel2.relative: 1.0 1.0;
120 description { state: "default" 0.0;
124 rel1 {relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_top"; }
125 rel2 {relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_bottom"; }
131 name: "padding_icon_text";
135 description { state: "default" 0.0; //when only icon or no icon is there
137 rel1 { relative: 1.0 0.0; to: "icon_rect"; }
138 rel2 { relative: 1.0 1.0; to: "icon_rect"; }
143 description { state: "icononly" 0.0;
144 inherit: "default" 0.0;
146 description { state: "visible" 0.0; //when icon is visible
148 rel1 { relative: 1.0 0.0; to: "icon_rect"; }
149 rel2 { relative: 1.0 1.0; to: "icon_rect"; }
155 part { name: "elm.swallow.content";
158 description { state: "default" 0.0;
161 rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
162 rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; }
165 description { state: "visible" 0.0;
169 rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
170 rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; }
172 aspect_preference: VERTICAL;
174 description { state: "icononly" 0.0;;
177 rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
178 rel2 {relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; }
181 aspect_preference: VERTICAL;
184 part { name: "elm.text";
189 description { state: "default" 0.0;
191 rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_top"; }
192 rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y:"padding_bottom"; }
194 color: 255 255 255 255;
197 font: "SLP:style=Medium";
202 text_class: "slp_medium";
205 description { state: "visible" 0.0;
206 inherit: "default" 0.0;
210 description { state: "clicked" 0.0;
211 inherit: "default" 0.0;
214 color: 255 255 255 255;
217 description { state: "disabled" 0.0;
218 inherit: "default" 0.0;
222 description { state: "disabled_visible" 0.0;
223 inherit: "default" 0.0;
228 description { state: "focused" 0.0;
229 inherit: "default" 0.0;
232 color: 255 255 255 255;
236 part { name: "over2";
240 ignore_flags: ON_HOLD;
241 description { state: "default" 0.0;
244 description { state: "disabled" 0.0;
245 inherit: "default" 0.0;
249 part { name: "over3";
253 description { state: "default" 0.0;
256 description { state: "clicked" 0.0;
257 inherit: "default" 0.0;
261 part { name: "disabler";
263 description { state: "default" 0.0;
267 description { state: "disabled" 0.0;
268 inherit: "default" 0.0;
274 program { name: "button_click";
275 signal: "mouse,down,1";
277 action: SIGNAL_EMIT "elm,action,press" "";
279 after: "button_click_anim";
281 program { name: touch_sound;
282 action: TOUCH_SOUND BUTTON_TOGGLE_OFF_SOUND 1 ;
284 program { name: "button_click_anim";
285 action: STATE_SET "clicked" 0.0;
286 target: "button_image";
287 after: "text_clicked";
289 program { name: "text_clicked";
293 get_state(PART:"elm.text", st, 30, vl);
294 if (!strcmp(st, "visible"))
295 set_state(PART:"elm.text", "clicked", 0.0);
298 program { name: "button_unpress";
299 action: SIGNAL_EMIT "elm,action,unpress" "";
301 program { name: "button_mouseout_clicked";
302 signal: "mouse,up,1";
307 get_state(PART:"elm.swallow.content", st, 30, vl);
308 if (strcmp(st, "icononly"))
310 emit("elm,action,default,text,set", "");
311 set_state(PART:"elm.text", "visible", 0.0);
313 if(get_int(button_state) !=1)
314 set_state(PART:"button_image", "default", 0.0);
316 after: button_unpress;
318 program { name: "button_click2";
319 signal: "mouse,down,1";
321 action: STATE_SET "clicked" 0.0;
324 program { name: "button_unclick2";
325 signal: "mouse,clicked,1";
327 action: STATE_SET "default" 0.0;
330 program { name: "button_unclick3";
331 signal: "mouse,clicked,1";
333 action: SIGNAL_EMIT "elm,action,click" "";
335 program { name: "text_show";
336 signal: "elm,state,text,visible";
341 get_state(PART:"elm.swallow.content", st, 30, vl);
342 if (!strcmp(st, "icononly"))
344 set_state(PART:"elm.swallow.content", "visible", 0.0);
345 set_state(PART:"padding_icon_text", "visible", 0.0);
347 set_state(PART:"elm.text", "visible", 0.0);
350 program { name: "text_hide";
351 signal: "elm,state,text,hidden";
356 get_state(PART:"elm.swallow.content", st, 30, vl);
357 if (!strcmp(st, "visible"))
359 set_state(PART:"elm.swallow.content", "icononly", 0.0);
360 set_state(PART:"padding_icon_text", "icononly", 0.0);
362 set_state(PART:"elm.text", "default", 0.0);
365 program { name: "icon_show";
366 signal: "elm,state,icon,visible";
371 get_state(PART:"elm.text", st, 30, vl);
372 if (!strcmp(st, "visible"))
374 set_state(PART:"elm.swallow.content", "visible", 0.0);
375 set_state(PART:"padding_icon_text", "visible", 0.0);
379 set_state(PART:"elm.swallow.content", "icononly", 0.0);
380 set_state(PART:"padding_icon_text", "icononly", 0.0);
384 program { name: "icon_hide";
385 signal: "elm,state,icon,hidden";
387 action: STATE_SET "default" 0.0;
388 target: "elm.swallow.content";
390 program { name: "disable";
391 signal: "elm,state,disabled";
393 action: STATE_SET "disabled" 0.0;
394 target: "button_image";
397 after: "disable_text";
399 program { name: "disable_text";
403 get_state(PART:"elm.text", st, 30, vl);
404 if (!strcmp(st, "visible"))
405 set_state(PART:"elm.text", "disabled_visible", 0.0);
407 set_state(PART:"elm.text", "disabled", 0.0);
408 set_int(button_state, 1);
411 program { name: "enable";
412 signal: "elm,state,enabled";
414 action: STATE_SET "default" 0.0;
415 target: "button_image";
418 after: "enable_text";
420 program { name: "enable_text";
424 get_state(PART:"elm.text", st, 30, vl);
425 if (!strcmp(st, "disabled_visible"))
426 set_state(PART:"elm.text", "visible", 0.0);
428 set_state(PART:"elm.text", "default", 0.0);
429 set_int(button_state, 0);
432 program { name: "focused";
433 signal: "elm,action,focus";
435 action: STATE_SET "focused" 0.0;
436 target: "button_image";
439 program { name: "unfocused";
440 signal: "elm,action,unfocus";
442 action: STATE_SET "default" 0.0;
443 target: "button_image";
444 after: "unfocus_text";
446 program { name: "unfocus_text";
447 action: STATE_SET "visible" 0.0;
453 ///////////////////////////////////////////////////////////////////////////////////////
454 group { name: "elm/button/base/haptic";
456 image: "00_message_button_add_recipient.png" COMP;
459 public button_state = 0; //0:enabled, 1: disabled
462 part { name: "button_image";
465 description { state: "default" 0.0;
466 rel1 { to_x: "padding.left"; to_y: "elm.text";}
467 rel2 { to_x: "padding.right"; to_y: "elm.text";}
470 normal: "00_message_button_add_recipient.png";
475 description { state: "clicked" 0.0;
476 inherit: "default" 0.0;
478 description { state: "disabled" 0.0;
479 inherit: "default" 0.0;
481 description { state: "focused" 0.0;
482 inherit: "default" 0.0;
485 part { name: "padding.left";
488 description { state: "default" 0.0;
494 rel2 { relative: 0.0 1.0; to_x: "elm.text";}
498 part { name: "padding.right";
501 description { state: "default" 0.0;
506 rel1 { relative: 1.0 0.0; to_x: "elm.text";}
507 rel2.relative: 1.0 1.0;
511 part { name: "elm.text";
516 description { state: "default" 0.0;
520 color: 255 255 255 255;
523 font: "SLP:style=Medium";
527 text_class: "slp_medium";
530 description { state: "visible" 0.0;
531 inherit: "default" 0.0;
535 description { state: "clicked" 0.0;
536 inherit: "default" 0.0;
542 description { state: "disabled" 0.0;
543 inherit: "default" 0.0;
547 description { state: "disabled_visible" 0.0;
548 inherit: "default" 0.0;
554 description { state: "focused" 0.0;
555 inherit: "default" 0.0;
558 color: 255 255 255 255;
561 part { name: "over1";
563 description { state: "default" 0.0;
564 rel2.relative: 1.0 0.5;
566 description { state: "disabled" 0.0;
567 inherit: "default" 0.0;
570 part { name: "over2";
573 ignore_flags: ON_HOLD;
574 description { state: "default" 0.0;
575 rel1.to: "button_image";
576 rel2.to: "button_image";
578 description { state: "disabled" 0.0;
579 inherit: "default" 0.0;
583 part { name: "over3";
586 description { state: "default" 0.0;
587 rel1.to: "button_image";
588 rel2.to: "button_image";
589 color: 255 255 255 0;
591 description { state: "clicked" 0.0;
592 inherit: "default" 0.0;
594 color: 255 255 255 0;
597 part { name: "disabler";
599 description { state: "default" 0.0;
600 rel1.to: "button_image";
601 rel2.to: "button_image";
605 description { state: "disabled" 0.0;
606 inherit: "default" 0.0;
612 program { name: "button_click";
613 signal: "mouse,down,1";
615 action: SIGNAL_EMIT "elm,action,press" "";
617 after: "button_click_anim";
619 program { name: touch_haptic;
620 action: TOUCH_HAPTIC LONG_TAP_HAPTIC 3 ;
622 program { name: "button_click_anim";
623 action: STATE_SET "clicked" 0.0;
624 target: "button_image";
627 program { name: "button_unpress";
628 action: SIGNAL_EMIT "elm,action,unpress" "";
630 program { name: "button_mouseout_clicked";
631 signal: "mouse,up,1";
636 get_state(PART:"elm.text", st, 30, vl);
637 if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
639 emit("elm,action,default,text,set", "");
640 set_state(PART:"elm.text", "visible", 0.0);
642 if(get_int(button_state) !=1)
643 set_state(PART:"button_image", "default", 0.0);
645 after: button_unpress;
647 program { name: "button_click2";
648 signal: "mouse,down,1";
650 action: STATE_SET "clicked" 0.0;
653 program { name: "button_unclick2";
654 signal: "mouse,clicked,1";
656 action: STATE_SET "default" 0.0;
659 program { name: "button_unclick3";
660 signal: "mouse,clicked,1";
662 action: SIGNAL_EMIT "elm,action,click" "";
664 program { name: "text_show";
665 signal: "elm,state,text,visible";
667 action: STATE_SET "visible" 0.0;
670 program { name: "text_hide";
671 signal: "elm,state,text,hidden";
673 action: STATE_SET "default" 0.0;
677 program { name: "disable";
678 signal: "elm,state,disabled";
680 action: STATE_SET "disabled" 0.0;
681 target: "button_image";
685 after: "disable_text";
687 program { name: "disable_text";
691 get_state(PART:"elm.text", st, 30, vl);
692 if (!strcmp(st, "visible"))
693 set_state(PART:"elm.text", "disabled_visible", 0.0);
695 set_state(PART:"elm.text", "disabled", 0.0);
696 set_int(button_state, 1);
699 program { name: "enable";
700 signal: "elm,state,enabled";
702 action: STATE_SET "default" 0.0;
703 target: "button_image";
707 after: "enable_text";
709 program { name: "enable_text";
713 get_state(PART:"elm.text", st, 30, vl);
714 if (!strcmp(st, "disabled_visible"))
715 set_state(PART:"elm.text", "visible", 0.0);
717 set_state(PART:"elm.text", "default", 0.0);
718 set_int(button_state, 0);
721 program { name: "focused";
722 signal: "elm,action,focus";
724 action: STATE_SET "focused" 0.0;
725 target: "button_image";
728 program { name: "unfocused";
729 signal: "elm,action,unfocus";
731 action: STATE_SET "default" 0.0;
732 target: "button_image";
733 action: STATE_SET "visible" 0.0;
738 ///////////////////////////////////////////////////////////////////////////////////////
739 group { name: "elm/button/base/sound_haptic_multiline";
741 image: "00_button_02_normal.png" COMP;
742 image: "00_button_02_press.png" COMP;
743 image: "00_button_02_focus.png" COMP;
746 public button_state = 0; //0:enabled, 1: disabled
749 style { name: "btn_sound_haptic_style";
750 base: "font=SLP:style=Medium font_size=18 align=center color=#ffffff wrap=mixed text_class=slp_medium";
753 tag: "hilight" "+ font=SLP:style=Bold";
754 tag: "b" "+ font=SLP:style=Bold";
759 part { name: "button_image";
762 description { state: "default" 0.0;
765 normal: "00_button_02_normal.png";
770 description { state: "clicked" 0.0;
771 inherit: "default" 0.0;
772 image.normal: "00_button_02_press.png";
774 description { state: "disabled" 0.0;
775 inherit: "default" 0.0;
777 description { state: "focused" 0.0;
778 inherit: "default" 0.0;
779 image.normal: "00_button_02_focus.png";
783 name: "padding_left";
787 description { state: "default" 0.0;
789 rel1.relative: 0.0 0.0;
790 rel2.relative: 0.0 1.0;
797 name: "padding_right";
801 description { state: "default" 0.0;
803 rel1.relative: 1.0 0.0;
804 rel2.relative: 1.0 1.0;
815 description { state: "default" 0.0;
817 rel1.relative: 0.0 0.0;
818 rel2.relative: 1.0 0.0;
825 name: "padding_bottom";
829 description { state: "default" 0.0;
831 rel1.relative: 0.0 1.0;
832 rel2.relative: 1.0 1.0;
843 description { state: "default" 0.0;
847 rel1 {relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_top"; }
848 rel2 {relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_bottom"; }
854 name: "padding_icon_text";
858 description { state: "default" 0.0; //when only icon or no icon is there
860 rel1 { relative: 1.0 0.0; to: "icon_rect"; }
861 rel2 { relative: 1.0 1.0; to: "icon_rect"; }
866 description { state: "icononly" 0.0;
867 inherit: "default" 0.0;
869 description { state: "visible" 0.0; //when icon is visible
871 rel1 { relative: 1.0 0.0; to: "icon_rect"; }
872 rel2 { relative: 1.0 1.0; to: "icon_rect"; }
878 part { name: "elm.swallow.content";
881 description { state: "default" 0.0;
884 rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
885 rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; }
888 description { state: "visible" 0.0;
892 rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
893 rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; }
895 aspect_preference: VERTICAL;
897 description { state: "icononly" 0.0;;
900 rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
901 rel2 {relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; }
904 aspect_preference: VERTICAL;
907 part { name: "elm.text";
912 description { state: "default" 0.0;
914 rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_top"; }
915 rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y:"padding_bottom"; }
917 color: 255 255 255 255;
920 style: "btn_sound_haptic_style";
925 description { state: "visible" 0.0;
926 inherit: "default" 0.0;
930 description { state: "clicked" 0.0;
931 inherit: "default" 0.0;
934 color: 255 255 255 255;
937 description { state: "disabled" 0.0;
938 inherit: "default" 0.0;
942 description { state: "disabled_visible" 0.0;
943 inherit: "default" 0.0;
948 description { state: "focused" 0.0;
949 inherit: "default" 0.0;
952 color: 255 255 255 255;
956 part { name: "over2";
960 ignore_flags: ON_HOLD;
961 description { state: "default" 0.0;
964 description { state: "disabled" 0.0;
965 inherit: "default" 0.0;
969 part { name: "over3";
973 description { state: "default" 0.0;
976 description { state: "clicked" 0.0;
977 inherit: "default" 0.0;
981 part { name: "disabler";
983 description { state: "default" 0.0;
987 description { state: "disabled" 0.0;
988 inherit: "default" 0.0;
994 program { name: "button_click";
995 signal: "mouse,down,1";
997 action: SIGNAL_EMIT "elm,action,press" "";
1000 after: "button_click_anim";
1002 program { name: touch_sound;
1003 action: TOUCH_SOUND BUTTON_PRESSED_SOUND 1;
1005 program { name: touch_haptic;
1006 action: TOUCH_HAPTIC WARNING_HAPTIC 3;
1008 program { name: "button_click_anim";
1009 action: STATE_SET "clicked" 0.0;
1010 target: "button_image";
1011 after: "text_clicked";
1013 program { name: "text_clicked";
1017 get_state(PART:"elm.text", st, 30, vl);
1018 if (!strcmp(st, "visible"))
1019 set_state(PART:"elm.text", "clicked", 0.0);
1022 program { name: "button_unpress";
1023 action: SIGNAL_EMIT "elm,action,unpress" "";
1025 program { name: "button_mouseout_clicked";
1026 signal: "mouse,up,1";
1031 get_state(PART:"elm.swallow.content", st, 30, vl);
1032 if (strcmp(st, "icononly"))
1034 emit("elm,action,default,text,set", "");
1035 set_state(PART:"elm.text", "visible", 0.0);
1037 if(get_int(button_state) !=1)
1038 set_state(PART:"button_image", "default", 0.0);
1040 after: button_unpress;
1042 program { name: "button_click2";
1043 signal: "mouse,down,1";
1045 action: STATE_SET "clicked" 0.0;
1048 program { name: "button_unclick2";
1049 signal: "mouse,clicked,1";
1051 action: STATE_SET "default" 0.0;
1054 program { name: "button_unclick3";
1055 signal: "mouse,clicked,1";
1057 action: SIGNAL_EMIT "elm,action,click" "";
1059 program { name: "text_show";
1060 signal: "elm,state,text,visible";
1065 get_state(PART:"elm.swallow.content", st, 30, vl);
1066 if (!strcmp(st, "icononly"))
1068 set_state(PART:"elm.swallow.content", "visible", 0.0);
1069 set_state(PART:"padding_icon_text", "visible", 0.0);
1071 set_state(PART:"elm.text", "visible", 0.0);
1074 program { name: "text_hide";
1075 signal: "elm,state,text,hidden";
1080 get_state(PART:"elm.swallow.content", st, 30, vl);
1081 if (!strcmp(st, "visible"))
1083 set_state(PART:"elm.swallow.content", "icononly", 0.0);
1084 set_state(PART:"padding_icon_text", "icononly", 0.0);
1086 set_state(PART:"elm.text", "default", 0.0);
1089 program { name: "icon_show";
1090 signal: "elm,state,icon,visible";
1095 get_state(PART:"elm.text", st, 30, vl);
1096 if (!strcmp(st, "visible"))
1098 set_state(PART:"elm.swallow.content", "visible", 0.0);
1099 set_state(PART:"padding_icon_text", "visible", 0.0);
1103 set_state(PART:"elm.swallow.content", "icononly", 0.0);
1104 set_state(PART:"padding_icon_text", "icononly", 0.0);
1108 program { name: "icon_hide";
1109 signal: "elm,state,icon,hidden";
1111 action: STATE_SET "default" 0.0;
1112 target: "elm.swallow.content";
1114 program { name: "disable";
1115 signal: "elm,state,disabled";
1117 action: STATE_SET "disabled" 0.0;
1118 target: "button_image";
1121 after: "disable_text";
1123 program { name: "disable_text";
1127 get_state(PART:"elm.text", st, 30, vl);
1128 if (!strcmp(st, "visible"))
1129 set_state(PART:"elm.text", "disabled_visible", 0.0);
1131 set_state(PART:"elm.text", "disabled", 0.0);
1132 set_int(button_state, 1);
1135 program { name: "enable";
1136 signal: "elm,state,enabled";
1138 action: STATE_SET "default" 0.0;
1139 target: "button_image";
1142 after: "enable_text";
1144 program { name: "enable_text";
1148 get_state(PART:"elm.text", st, 30, vl);
1149 if (!strcmp(st, "disabled_visible"))
1150 set_state(PART:"elm.text", "visible", 0.0);
1152 set_state(PART:"elm.text", "default", 0.0);
1153 set_int(button_state, 0);
1156 program { name: "focused";
1157 signal: "elm,action,focus";
1159 action: STATE_SET "focused" 0.0;
1160 target: "button_image";
1163 program { name: "unfocused";
1164 signal: "elm,action,unfocus";
1166 action: STATE_SET "default" 0.0;
1167 target: "button_image";
1168 after: "unfocus_text";
1170 program { name: "unfocus_text";
1171 action: STATE_SET "visible" 0.0;