tizen 2.3.1 release
[framework/uifw/efl-theme-tizen.git] / 2.3-wearable-circle / widgets / button.edc
1 /*
2  * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Licensed under the Flora License, Version 1.1 (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
7  *
8  *     http://floralicense.org/license/
9  *
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.
15  */
16
17    group { name: "elm/button/base/default";
18       script {
19          public mouse_down = 0;
20          public multi_down = 0;
21       }
22       parts {
23          part { name: "bg";
24             type: RECT;
25             scale: 1;
26             description { state: "default" 0.0;
27                min: 0 BUTTON_HEIGHT_INC;
28                color: 0 44 76 255;
29             }
30             description { state: "pressed" 0.0;
31                inherit: "default" 0.0;
32                color: 0 74 127 255;
33             }
34             description { state: "disabled" 0.0;
35                inherit: "default" 0.0;
36                color: 33 33 33 255;
37             }
38          }
39          part { name: "padding_left_top";
40             type: SPACER;
41             scale: 1;
42             description { state: "default" 0.0;
43                align: 0.0 0.0;
44                rel2.relative: 0.0 0.0;
45                min: BUTTON_PADDING_SIZE_INC;
46                fixed: 1 1;
47             }
48          }
49          part { name: "padding_right_bottom";
50             type: SPACER;
51             scale: 1;
52             description { state: "default" 0.0;
53                align: 1.0 1.0;
54                rel1.relative: 1.0 1.0;
55                min: BUTTON_PADDING_SIZE_INC;
56                fixed: 1 1;
57             }
58          }
59          part { name: "icon_rect";
60             type: SPACER;
61             scale: 1;
62             description { state: "default" 0.0;
63                align: 0.0 0.5;
64                rel1 {
65                   relative: 1.0 1.0;
66                   to: "padding_left_top";
67                }
68                rel2 {
69                   relative: 1.0 0.0;
70                   to_x: "padding_left_top";
71                   to_y: "padding_right_bottom";
72                }
73                min: 0 0;
74                fixed: 1 1;
75             }
76             description { state: "visible" 0.0;
77                inherit: "default" 0.0;
78                min: BUTTON_ICON_SIZE_INC;
79                max: BUTTON_ICON_SIZE_INC;
80                fixed: 1 1;
81             }
82          }
83          part { name: "elm.swallow.content";
84             type: SWALLOW;
85             clip_to: "elm.swallow.content.clip";
86             scale: 1;
87             description { state: "default" 0.0;
88                visible: 0;
89                align: 0.0 0.5;
90                rel1 {
91                   relative: 1.0 1.0;
92                   to: "padding_left_top";
93                }
94                rel2 {
95                   relative: 1.0 0.0;
96                   to_x: "padding_left_top";
97                   to_y: "padding_right_bottom";
98                }
99                fixed: 1 0;
100             }
101             description { state: "visible" 0.0;
102                fixed: 1 1;
103                min: BUTTON_ICON_SIZE_INC;
104                max: BUTTON_ICON_SIZE_INC;
105                align: 1.0 0.5;
106                rel1 {
107                   relative: 0.0 1.0;
108                   to_x: "elm.text";
109                   to_y: "padding_left_top";
110                }
111                rel2 {
112                   relative: 0.0 0.0;
113                   to_x: "elm.text";
114                   to_y: "padding_right_bottom";
115                }
116             }
117             description { state: "icononly" 0.0;
118                min: BUTTON_ICON_SIZE_INC;
119                max: BUTTON_ICON_SIZE_INC;
120             }
121          }
122          part { name: "elm.text";
123             type: TEXTBLOCK;
124             mouse_events: 0;
125             scale: 1;
126             description { state: "default" 0.0;
127                fixed: 1 1;
128                rel1 {
129                   relative: 1.0 1.0;
130                   to_x: "icon_rect";
131                   to_y: "padding_left_top";
132                }
133                rel2 {
134                   relative: 0.0 0.0;
135                   to: "padding_right_bottom";
136                }
137                text {
138                   max: 1 0;
139                   style: "button_general_text_normal";
140                }
141             }
142             description { state: "disabled" 0.0;
143                inherit: "default" 0.0;
144                text.style: "button_general_text_dim";
145             }
146             description { state: "pressed" 0.0;
147                inherit: "default" 0.0;
148                text.style: "button_general_text_press";
149             }
150          }
151          part { name: "elm.swallow.content.clip";
152             type: RECT;
153             scale: 1;
154             description { state: "default" 0.0;
155                color: 0 148 255 255;
156             }
157             description { state: "disabled" 0.0;
158                inherit: "default" 0.0;
159                color: 249 249 249 76;
160             }
161          }
162          part { name: "event";
163             type: RECT;
164             scale: 1;
165             description { state: "default" 0.0;
166                color: 0 0 0 0;
167                rel1.to: "bg";
168                rel2.to: "bg";
169             }
170          }
171       }
172       programs {
173          program { name: "pressed";
174             signal: "mouse,down,1*";
175             source: "event";
176             script {
177                if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0))
178                  {
179                      set_int(mouse_down, 1);
180                      run_program(PROGRAM:"button_press1");
181                  }
182             }
183          }
184          program { name: "button_press1";
185             script {
186                new st[31];
187                new Float:vl;
188                get_state(PART:"bg", st, 30, vl);
189                if (strcmp(st, "disabled")) {
190                   set_state(PART:"bg", "pressed", 0.0);
191                   set_state(PART:"elm.text", "pressed", 0.0);
192                   emit("elm,action,press", "");
193                }
194             }
195          }
196          program { name: "unpressed";
197             signal: "mouse,up,1";
198             source: "event";
199             script {
200                if (get_int(mouse_down) == 1) {
201                  set_int(mouse_down, 0);
202                  run_program(PROGRAM:"button_unpress1");
203                }
204             }
205          }
206          program { name: "button_unpress1";
207             script {
208                new st[31];
209                new Float:vl;
210                get_state(PART:"bg", st, 30, vl);
211                if (strcmp(st, "disabled")) {
212                   set_state(PART:"bg", "default", 0.0);
213                   set_state(PART:"elm.text", "default", 0.0);
214                   emit("elm,action,unpress", "");
215                }
216             }
217          }
218          program { name: "touch_snd";
219             signal: "mouse,clicked,1";
220             source: "event";
221             script {
222                new st[31];
223                new Float:vl;
224                if (get_int(multi_down) == 0) {
225                   get_state(PART:"bg", st, 30, vl);
226                   if (strcmp(st, "disabled")) {
227                      run_program(PROGRAM:"play_sample");
228                      emit("elm,action,click", "");
229                   }
230                }
231             }
232          }
233          program {
234             name: "play_sample";
235             action: RUN_PLUGIN "touch_sound";
236          }
237          program { name: "text_show";
238             signal: "elm,state,text,visible";
239             source: "elm";
240             script {
241                new st[31];
242                new Float:vl;
243                get_state(PART:"elm.swallow.content", st, 30, vl);
244                if (!strcmp(st, "icononly"))
245                  {
246                     set_state(PART:"elm.swallow.content", "visible", 0.0);
247                     set_state(PART:"icon_rect", "visible", 0.0);
248                  }
249                get_state(PART:"bg", st, 30, vl);
250                if (strcmp(st, "disabled"))
251                   set_state(PART:"elm.text", "default", 0.0);
252                else
253                   set_state(PART:"elm.text", "disabled", 0.0);
254             }
255          }
256          program { name: "text_hide";
257             signal: "elm,state,text,hidden";
258             source: "elm";
259             script {
260                new st[31];
261                new Float:vl;
262                get_state(PART:"elm.swallow.content", st, 30, vl);
263                if (!strcmp(st, "visible"))
264                  {
265                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
266                     set_state(PART:"icon_rect", "default", 0.0);
267                  }
268                set_state(PART:"elm.text", "default", 0.0);
269             }
270          }
271          program { name: "icon_show";
272             signal: "elm,state,icon,visible";
273             source: "elm";
274             action: STATE_SET "visible" 0.0;
275             target: "elm.swallow.content";
276             target: "icon_rect";
277          }
278          program { name: "icon_hide";
279             signal: "elm,state,icon,hidden";
280             source: "elm";
281             action: STATE_SET "default" 0.0;
282             target: "elm.swallow.content";
283             target: "icon_rect";
284          }
285          program { name: "disable";
286             signal: "elm,state,disabled";
287             source: "elm";
288             action: STATE_SET "disabled" 0.0;
289             target: "bg";
290             target: "elm.swallow.content.clip";
291             target: "elm.text";
292          }
293          program { name: "enable";
294             signal: "elm,state,enabled";
295             source: "elm";
296             action: STATE_SET "default" 0.0;
297             target: "bg";
298             target: "elm.swallow.content.clip";
299             target: "elm.text";
300          }
301          program { name: "multi_down";
302             signal: "elm,action,multi,down";
303             source: "elm";
304             script {
305                set_int(multi_down, 1);
306             }
307          }
308          program { name: "multi_up";
309             signal: "elm,action,multi,up";
310             source: "elm";
311             script {
312                set_int(multi_down, 0);
313             }
314          }
315       }
316    }
317
318    group { name: "elm/button/base/fastscroll";
319       images {
320          image: "b_fast_scroll_rollover_bg.png" COMP;
321       }
322       parts {
323          part { name: "bg";
324             type: IMAGE;
325             scale: 1;
326             description { state: "default" 0.0;
327                min: BUTTON_FASTSCROLL_CUE_BUTTON_SIZE_INC;
328                image.normal: "b_fast_scroll_rollover_bg.png";
329                color: 45 45 45 255;
330             }
331             description { state: "pressed" 0.0;
332                inherit: "default" 0.0;
333                color: 45 45 45 255;
334             }
335             description { state: "disabled" 0.0;
336                inherit: "default" 0.0;
337                color: 45 45 45 255;
338             }
339          }
340          part { name: "padding_right";
341             type: SPACER;
342             scale: 1;
343             description { state: "default" 0.0;
344                align: 1.0 0.5;
345                rel1.relative: 1.0 0.0;
346                min: BUTTON_FASTSCROLL_CUE_RIGHT_PADDING_SIZE_INC;
347                max: BUTTON_FASTSCROLL_CUE_RIGHT_PADDING_SIZE_INC;
348                fixed: 1 1;
349             }
350          }
351          part { name: "elm.text";
352             type: TEXTBLOCK;
353             mouse_events: 0;
354             scale: 1;
355             description { state: "default" 0.0;
356                fixed: 1 1;
357                rel1 {
358                   relative: 0.0 0.0;
359                   to: "padding_right";
360                }
361                rel2 {
362                   relative: 0.0 1.0;
363                   to: "padding_right";
364                }
365                text {
366                   max: 1 0;
367                   style: "button_fastscroll";
368                }
369                min: BUTTON_FASTSCROLL_CUE_TEXT_SIZE_INC;
370                max: BUTTON_FASTSCROLL_CUE_TEXT_SIZE_INC;
371                align: 1.0 0.5;
372             }
373             description { state: "disabled" 0.0;
374                inherit: "default" 0.0;
375                text.style: "button_general_text_dim";
376             }
377             description { state: "pressed" 0.0;
378                inherit: "default" 0.0;
379                text.style: "button_general_text_press";
380             }
381          }
382       }
383    }
384
385    group { name: "elm/button/base/popup/circle";
386       images {
387          image: "tw_bottom_btn_press_bg.png" COMP;
388       }
389       script {
390          public mouse_down = 0;
391          public multi_down = 0;
392       }
393       parts {
394          part { name: "padding";
395             type: "SPACER";
396             scale: 1;
397             mouse_events: 0;
398             description { state: "default" 0.0;
399                fixed: 1 1;
400                min: 0 BUTTON_POPUP_EFFECT_PADDING_SIZE_INC;
401                rel1.relative: 0.5 1.0;
402                rel2.relative: 0.5 1.0;
403                align: 0.5 0.0;
404             }
405          }
406          part { name: "bg";
407             type: IMAGE;
408             scale: 1;
409             mouse_events: 0;
410             description { state: "default" 0.0;
411                fixed: 1 1;
412                min: BUTTON_POPUP_SIZE_INC;
413                image.normal: "tw_bottom_btn_press_bg.png";
414                rel1.to: "padding";
415                rel1.relative: 0.5 1.0;
416                rel2.to: "padding";
417                rel2.relative: 0.5 1.0;
418                align: 0.5 1.0;
419                color: 0 44 76 255;
420             }
421             description { state: "pressed" 0.0;
422                inherit: "default" 0.0;
423                rel1.relative: 0.5 0.0;
424                rel2.relative: 0.5 0.0;
425                color: 0 148 255 127;
426             }
427             description { state: "disabled" 0.0;
428                inherit: "default" 0.0;
429                color: 33 33 33 255;
430             }
431          }
432          part { name: "icon_rect_padding";
433             type: SPACER;
434             scale: 1;
435             description { state: "default" 0.0;
436                fixed: 0 1;
437                min: 0 BUTTON_POPUP_ICON_TOP_PADDING_INC;
438                rel1.to: "bg";
439                rel2.to: "bg";
440                rel2.relative: 1.0 0.0;
441                align: 0.5 0.0;
442             }
443             description { state: "pressed" 0.0;
444                inherit: "default" 0.0;
445             }
446          }
447          part { name: "icon_rect";
448             type: SPACER;
449             scale: 1;
450             description { state: "default" 0.0;
451                align: 0.5 0.0;
452                rel1.to: "icon_rect_padding";
453                rel1.relative: 0.0 1.0;
454                rel2.to: "icon_rect_padding";
455                min: BUTTON_POPUP_ICON_SIZE_INC;
456                max: BUTTON_POPUP_ICON_SIZE_INC;
457                fixed: 0 1;
458             }
459          }
460          part { name: "elm.swallow.content";
461             type: SWALLOW;
462             scale: 1;
463             clip_to: "clip";
464             description { state: "default" 0.0;
465                visible: 0;
466                rel1.to: "icon_rect";
467                rel2.to: "icon_rect";
468             }
469             description { state: "visible" 0.0;
470                rel1.to: "icon_rect";
471                rel2.to: "icon_rect";
472             }
473             description { state: "icononly" 0.0;
474                rel1.to: "icon_rect";
475                rel2.to: "icon_rect";
476             }
477          }
478          part { name: "clip";
479             type: RECT;
480             scale: 1;
481             description { state: "default" 0.0;
482                rel1.to: "elm.swallow.content";
483                rel2.to: "elm.swallow.content";
484                color: 0 148 255 255;
485             }
486             description { state: "disabled" 0.0;
487                inherit: "default" 0.0;
488                color: 249 249 249 76;
489             }
490          }
491          part { name: "event";
492             type: RECT;
493             scale: 1;
494             description { state: "default" 0.0;
495                color: 0 0 0 0;
496                rel1.to: "bg";
497                rel2.to: "bg";
498                fixed: 1 1;
499                min: 158 158;
500             }
501          }
502       }
503       programs {
504          program { name: "pressed";
505             signal: "mouse,down,1*";
506             source: "event";
507             script {
508                if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0))
509                  {
510                      set_int(mouse_down, 1);
511                      run_program(PROGRAM:"button_press1");
512                  }
513             }
514          }
515          program { name: "button_press1";
516             script {
517                new st[31];
518                new Float:vl;
519                get_state(PART:"bg", st, 30, vl);
520                if (strcmp(st, "disabled")) {
521                   run_program(PROGRAM:"pressed_effect");
522                   emit("elm,action,press", "");
523                }
524             }
525          }
526          program { name: "pressed_effect";
527             action: STATE_SET "pressed" 0.0;
528             transition: CUBIC_BEZIER 0.25 0.45 0.03 0.41 1.0;
529             target: "bg";
530             target: "icon_rect_padding";
531          }
532          program { name: "unpressed";
533             signal: "mouse,up,1";
534             source: "event";
535             script {
536                if (get_int(mouse_down) == 1) {
537                  set_int(mouse_down, 0);
538                  run_program(PROGRAM:"button_unpress1");
539                }
540             }
541          }
542          program { name: "button_unpress1";
543             script {
544                new st[31];
545                new Float:vl;
546                get_state(PART:"bg", st, 30, vl);
547                if (strcmp(st, "disabled")) {
548                   run_program(PROGRAM:"unpressed_effect");
549                   emit("elm,action,unpress", "");
550                }
551             }
552          }
553          program { name: "unpressed_effect";
554             action: STATE_SET "default" 0.0;
555             transition: CUBIC_BEZIER 0.25 0.45 0.03 0.41 1.0;
556             target: "bg";
557             target: "icon_rect_padding";
558          }
559          program { name: "touch_snd";
560             signal: "mouse,clicked,1";
561             source: "event";
562             script {
563                new st[31];
564                new Float:vl;
565                if (get_int(multi_down) == 0) {
566                   get_state(PART:"bg", st, 30, vl);
567                   if (strcmp(st, "disabled")) {
568                      run_program(PROGRAM:"play_sample");
569                      emit("elm,action,click", "");
570                   }
571                }
572             }
573          }
574          program {
575             name: "play_sample";
576             action: RUN_PLUGIN "touch_sound";
577          }
578          program { name: "text_show";
579             signal: "elm,state,text,visible";
580             source: "elm";
581             script {
582                new st[31];
583                new Float:vl;
584                get_state(PART:"elm.swallow.content", st, 30, vl);
585                if (!strcmp(st, "icononly"))
586                  {
587                     set_state(PART:"elm.swallow.content", "visible", 0.0);
588                     set_state(PART:"icon_rect", "visible", 0.0);
589                  }
590                get_state(PART:"bg", st, 30, vl);
591             }
592          }
593          program { name: "text_hide";
594             signal: "elm,state,text,hidden";
595             source: "elm";
596             script {
597                new st[31];
598                new Float:vl;
599                get_state(PART:"elm.swallow.content", st, 30, vl);
600                if (!strcmp(st, "visible"))
601                  {
602                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
603                     set_state(PART:"icon_rect", "default", 0.0);
604                  }
605             }
606          }
607          program { name: "icon_show";
608             signal: "elm,state,icon,visible";
609             source: "elm";
610             action: STATE_SET "visible" 0.0;
611             target: "elm.swallow.content";
612             target: "icon_rect";
613          }
614          program { name: "icon_hide";
615             signal: "elm,state,icon,hidden";
616             source: "elm";
617             action: STATE_SET "default" 0.0;
618             target: "elm.swallow.content";
619             target: "icon_rect";
620          }
621          program { name: "disable";
622             signal: "elm,state,disabled";
623             source: "elm";
624             action: STATE_SET "disabled" 0.0;
625             target: "bg";
626             target: "clip";
627          }
628          program { name: "enable";
629             signal: "elm,state,enabled";
630             source: "elm";
631             action: STATE_SET "default" 0.0;
632             target: "bg";
633             target: "clip";
634          }
635          program { name: "multi_down";
636             signal: "elm,action,multi,down";
637             source: "elm";
638             script {
639                set_int(multi_down, 1);
640             }
641          }
642          program { name: "multi_up";
643             signal: "elm,action,multi,up";
644             source: "elm";
645             script {
646                set_int(multi_down, 0);
647             }
648          }
649       }
650    }
651
652    group { name: "elm/button/base/popup/circle/left";
653       inherit: "elm/button/base/popup/circle";
654       images {
655          image: "tw_ic_popup_left_btn_press_bg.png" COMP;
656       }
657       parts{
658          part { name: "padding";
659             type: "SPACER";
660             scale: 1;
661             mouse_events: 0;
662             description { state: "default" 0.0;
663                fixed: 1 1;
664                min: BUTTON_POPUP_EFFECT_PADDING_SIZE_INC 0;
665                rel1.relative: 0.0 0.5;
666                rel2.relative: 0.0 0.5;
667                align: 1.0 0.5;
668             }
669          }
670          part { name: "bg";
671             scale: 1;
672             mouse_events: 0;
673             description { state: "default" 0.0;
674                image.normal: "tw_ic_popup_left_btn_press_bg.png";
675                fixed: 1 1;
676                min: BUTTON_POPUP_LR_SIZE_INC;
677                rel1.to: "padding";
678                rel1.relative: 0.0 0.5;
679                rel2.to: "padding";
680                rel2.relative: 0.0 0.5;
681                align: 0.0 0.5;
682                color: 0 44 76 255;
683             }
684             description { state: "pressed" 0.0;
685                inherit: "default" 0.0;
686                rel1.relative: 1.0 0.5;
687                rel2.relative: 1.0 0.5;
688                color: 0 148 255 127;
689             }
690             description { state: "disabled" 0.0;
691                inherit: "default" 0.0;
692                color: 33 33 33 255;
693             }
694          }
695          part { name: "icon_rect_padding";
696             type: SPACER;
697             scale: 1;
698             description { state: "default" 0.0;
699                fixed: 1 0;
700                min: BUTTON_POPUP_ICON_LR_PADDING_INC 0;
701                rel1.to: "bg";
702                rel2.to: "bg";
703                rel2.relative: 0.0 1.0;
704                align: 0.0 0.5;
705             }
706             description { state: "pressed" 0.0;
707                inherit: "default" 0.0;
708                min: 22 0;
709             }
710          }
711          part { name: "icon_rect";
712             type: SPACER;
713             scale: 1;
714             description { state: "default" 0.0;
715                align: 0.0 0.5;
716                rel1.to: "icon_rect_padding";
717                rel1.relative: 1.0 0.0;
718                rel2.to: "icon_rect_padding";
719                min: BUTTON_POPUP_ICON_SIZE_INC;
720                max: BUTTON_POPUP_ICON_SIZE_INC;
721                fixed: 1 0;
722             }
723          }
724       }
725    }
726
727    group { name: "elm/button/base/popup/circle/right";
728       inherit: "elm/button/base/popup/circle";
729       images {
730          image: "tw_ic_popup_right_btn_press_bg.png" COMP;
731       }
732       parts{
733          part { name: "padding";
734             type: "SPACER";
735             scale: 1;
736             mouse_events: 0;
737             description { state: "default" 0.0;
738                fixed: 1 1;
739                min: BUTTON_POPUP_EFFECT_PADDING_SIZE_INC 0;
740                rel1.relative: 1.0 0.5;
741                rel2.relative: 1.0 0.5;
742                align: 0.0 0.5;
743             }
744          }
745          part { name: "bg";
746             scale: 1;
747             mouse_events: 0;
748             description { state: "default" 0.0;
749                image.normal: "tw_ic_popup_right_btn_press_bg.png";
750                fixed: 1 1;
751                min: BUTTON_POPUP_LR_SIZE_INC;
752                rel1.to: "padding";
753                rel1.relative: 1.0 0.5;
754                rel2.to: "padding";
755                rel2.relative: 1.0 0.5;
756                align: 1.0 0.5;
757                color: 0 44 76 255;
758             }
759             description { state: "pressed" 0.0;
760                inherit: "default" 0.0;
761                rel1.relative: 0.0 0.5;
762                rel2.relative: 0.0 0.5;
763                color: 0 148 255 127;
764             }
765             description { state: "disabled" 0.0;
766                inherit: "default" 0.0;
767                color: 33 33 33 255;
768             }
769          }
770          part { name: "icon_rect_padding";
771             type: SPACER;
772             scale: 1;
773             description { state: "default" 0.0;
774                fixed: 1 0;
775                min: BUTTON_POPUP_ICON_LR_PADDING_INC 0;
776                rel1.to: "bg";
777                rel1.relative: 1.0 0.0;
778                rel2.to: "bg";
779                rel2.relative: 1.0 1.0;
780                align: 1.0 0.5;
781             }
782             description { state: "pressed" 0.0;
783                inherit: "default" 0.0;
784                min: 22 0;
785             }
786          }
787          part { name: "icon_rect";
788             type: SPACER;
789             scale: 1;
790             description { state: "default" 0.0;
791                align: 1.0 0.5;
792                rel1.to: "icon_rect_padding";
793                rel1.relative: 0.0 0.0;
794                rel2.to: "icon_rect_padding";
795                rel2.relative: 0.0 1.0;
796                min: BUTTON_POPUP_ICON_SIZE_INC;
797                max: BUTTON_POPUP_ICON_SIZE_INC;
798                fixed: 1 0;
799             }
800          }
801       }
802    }
803
804    group { name: "elm/button/base/popup/circle/body";
805       images {
806          image: "tw_popup_body_btn.png" COMP;
807       }
808       script {
809          public mouse_down = 0;
810          public multi_down = 0;
811       }
812       parts {
813          part { name: "base";
814             type: RECT;
815             scale: 1;
816             description { state: "default" 0.0;
817                min: POPUP_BODY_BUTTON_WIDTH_INC POPUP_BODY_BUTTON_HEIGHT_INC;
818                max: POPUP_BODY_BUTTON_WIDTH_INC POPUP_BODY_BUTTON_HEIGHT_INC;
819                color: 0 0 0 0;
820             }
821          }
822          part { name: "bg";
823             scale: 1;
824             mouse_events: 0;
825             description { state: "default" 0.0;
826                image.normal: "tw_popup_body_btn.png";
827                rel1.to: "base";
828                rel2.to: "base";
829                color: 10 63 94 255;
830             }
831             description { state: "pressed" 0.0;
832                inherit: "default" 0.0;
833                color: 22 73 114 255;
834             }
835             description { state: "disabled" 0.0;
836                inherit: "default" 0.0;
837                color: 3 43 63 255;
838             }
839          }
840          part { name: "elm.text";
841             type: TEXTBLOCK;
842             mouse_events: 0;
843             scale: 1;
844             description { state: "default" 0.0;
845                align: 0.5 0.5;
846                fixed: 1 1;
847                min: 150 42;
848                max: 150 84;
849                rel1 {
850                   relative: 0.0 0.0;
851                   to: "base";
852                }
853                rel2 {
854                   relative: 1.0 1.0;
855                   to: "base";
856                }
857                text {
858                   min: 1 0;
859                   style: "button_popup_body_text_normal";
860                }
861             }
862          }
863          part { name: "event";
864             type: RECT;
865             scale: 1;
866             description { state: "default" 0.0;
867                color: 0 0 0 0;
868                rel1.to: "base";
869                rel2.to: "base";
870             }
871          }
872       }
873       programs {
874          program { name: "pressed";
875             signal: "mouse,down,1*";
876             source: "event";
877             script {
878                if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0))
879                  {
880                      set_int(mouse_down, 1);
881                      run_program(PROGRAM:"button_press1");
882                  }
883             }
884          }
885          program { name: "button_press1";
886             script {
887                new st[31];
888                new Float:vl;
889                get_state(PART:"bg", st, 30, vl);
890                if (strcmp(st, "disabled")) {
891                   set_state(PART:"bg", "pressed", 0.0);
892                   emit("elm,action,press", "");
893                }
894             }
895          }
896          program { name: "unpressed";
897             signal: "mouse,up,1";
898             source: "event";
899             script {
900                if (get_int(mouse_down) == 1) {
901                  set_int(mouse_down, 0);
902                  run_program(PROGRAM:"button_unpress1");
903                }
904             }
905          }
906          program { name: "button_unpress1";
907             script {
908                new st[31];
909                new Float:vl;
910                get_state(PART:"bg", st, 30, vl);
911                if (strcmp(st, "disabled")) {
912                   set_state(PART:"bg", "default", 0.0);
913                   emit("elm,action,unpress", "");
914                }
915             }
916          }
917          program { name: "touch_snd";
918             signal: "mouse,clicked,1";
919             source: "event";
920             script {
921                new st[31];
922                new Float:vl;
923                if (get_int(multi_down) == 0) {
924                   get_state(PART:"bg", st, 30, vl);
925                   if (strcmp(st, "disabled")) {
926                      run_program(PROGRAM:"play_sample");
927                      emit("elm,action,click", "");
928                   }
929                }
930             }
931          }
932          program {
933             name: "play_sample";
934             action: RUN_PLUGIN "touch_sound";
935          }
936          program { name: "disable";
937             signal: "elm,state,disabled";
938             source: "elm";
939             action: STATE_SET "disabled" 0.0;
940             target: "bg";
941          }
942          program { name: "enable";
943             signal: "elm,state,enabled";
944             source: "elm";
945             action: STATE_SET "default" 0.0;
946             target: "bg";
947          }
948          program { name: "multi_down";
949             signal: "elm,action,multi,down";
950             source: "elm";
951             script {
952                set_int(multi_down, 1);
953             }
954          }
955          program { name: "multi_up";
956             signal: "elm,action,multi,up";
957             source: "elm";
958             script {
959                set_int(multi_down, 0);
960             }
961          }
962       }
963    }
964
965    group { name: "elm/button/base/list_divider_btn";
966       inherit: "elm/button/base/default";
967       images {
968          image: "b_ic_press_circle_bg.png" COMP;
969       }
970       parts {
971          part { name: "bg";
972             type: RECT;
973             scale: 1;
974             description { state: "default" 0.0;
975                color: 0 0 0 0;
976             }
977             description { state: "disabled" 0.0;
978                inherit: "default" 0.0;
979             }
980          }
981          part { name: "bg_ef";
982             type: IMAGE;
983             scale: 1;
984             repeat_events: 1;
985             description { state: "default" 0.0;
986                visible: 0;
987                image.normal: "b_ic_press_circle_bg.png";
988                map.on: 1;
989                rel1.to: "elm.swallow.content";
990                rel2.to: "elm.swallow.content";
991                min: BUTTON_DIVIDER_BTN_EFFECT_SIZE_INC;
992                max: BUTTON_DIVIDER_BTN_EFFECT_SIZE_INC;
993                fixed: 1 1;
994                color: 249 249 249 25;
995             }
996             description { state: "start_persp" 0.0;
997                inherit: "default" 0.0;
998                visible: 1;
999                map {
1000                   zoom.x: 1.3;
1001                   zoom.y: 1.3;
1002                }
1003             }
1004             description { state: "end_persp" 0.0;
1005                inherit: "default" 0.0;
1006                map {
1007                   zoom.x: 1.0;
1008                   zoom.y: 1.0;
1009                }
1010             }
1011          }
1012          part { name: "left_padding";
1013             type: SPACER;
1014             scale: 1;
1015             description { state: "default" 0.0;
1016                min: BUTTON_DIVIDER_BTN_PADDING_LEFT_SIZE_INC 0;
1017                max: BUTTON_DIVIDER_BTN_PADDING_LEFT_SIZE_INC -1;
1018                fixed: 1 1;
1019                align: 0.0 0.5;
1020                rel1.to: "bg";
1021                rel2 {
1022                   to: "bg";
1023                   relative: 0.0 1.0;
1024                }
1025             }
1026          }
1027          part { name: "right_padding";
1028             type: SPACER;
1029             scale: 1;
1030             description { state: "default" 0.0;
1031                min: BUTTON_DIVIDER_BTN_PADDING_RIGHT_SIZE_INC 0;
1032                max: BUTTON_DIVIDER_BTN_PADDING_RIGHT_SIZE_INC -1;
1033                fixed: 1 1;
1034                align: 1.0 0.5;
1035                rel1 {
1036                   to: "bg";
1037                   relative: 1.0 0.0;
1038                }
1039                rel2.to: "bg";
1040             }
1041          }
1042          part { name: "elm.swallow.content";
1043             clip_to: "elm.swallow.content.clip";
1044             type: SWALLOW;
1045             scale: 1;
1046             description { state: "default" 0.0;
1047                min: BUTTON_DIVIDER_BTN_ICON_SIZE_INC 0;
1048                max: BUTTON_DIVIDER_BTN_ICON_SIZE_INC -1;
1049                fixed: 1 1;
1050                align: 0.5 0.5;
1051                visible: 1;
1052                rel1 {
1053                   to: "left_padding";
1054                   relative: 1.0 0.0;
1055                }
1056                rel2 {
1057                   to: "right_padding";
1058                   relative: 0.0 1.0;
1059                }
1060             }
1061             description { state: "visible" 0.0;
1062                inherit: "default" 0.0;
1063             }
1064             description { state: "icononly" 0.0;
1065                inherit: "default" 0.0;
1066             }
1067          }
1068          part { name: "elm.swallow.content.clip";
1069             type: RECT;
1070             scale: 1;
1071             description { state: "default" 0.0;
1072                color: 0 148 255 255;
1073             }
1074             description { state: "disabled" 0.0;
1075                inherit: "default" 0.0;
1076                color: 249 249 249 76;
1077             }
1078          }
1079          part { name: "event";
1080             type: RECT;
1081             scale: 1;
1082             repeat_events: 0;
1083             description { state: "default" 0.0;
1084                color: 0 0 0 0;
1085             }
1086             description { state: "disabled" 0.0;
1087                inherit: "default" 0.0;
1088             }
1089          }
1090       }
1091       programs {
1092          program { name: "pressed";
1093             signal: "mouse,down,1*";
1094             source: "event";
1095             script {
1096                new st[31];
1097                new Float:vl;
1098                get_state(PART:"event", st, 30, vl);
1099                if (strcmp(st, "disabled")) {
1100                   set_state(PART:"bg_ef", "pressed_start", 0.0);
1101                   run_program(PROGRAM:"start_persp");
1102                   emit("elm,action,press", "");
1103                }
1104             }
1105          }
1106          program { name: "start_persp";
1107             action: STATE_SET "start_persp" 0.0;
1108             transition: CUBIC_BEZIER 0.5 0.45 0.03 0.41 1.0;
1109             target: "bg_ef";
1110          }
1111          program { name: "end_persp";
1112             action: STATE_SET "end_persp" 0.0;
1113             transition: CUBIC_BEZIER 0.0 0.45 0.03 0.41 1.0;
1114             target: "bg_ef";
1115          }
1116          program { name: "unpressed";
1117             signal: "mouse,up,1";
1118             source: "event";
1119             script {
1120                new st[31];
1121                new Float:vl;
1122                get_state(PART:"event", st, 30, vl);
1123                if (strcmp(st, "disabled")) {
1124                   run_program(PROGRAM:"end_persp");
1125                   emit("elm,action,unpress", "");
1126                }
1127             }
1128          }
1129          program { name: "touch_snd";
1130             signal: "mouse,clicked,1";
1131             source: "event";
1132             script {
1133                new st[31];
1134                new Float:vl;
1135                get_state(PART:"event", st, 30, vl);
1136                if (strcmp(st, "disabled")) {
1137                   run_program(PROGRAM:"play_sample");
1138                   emit("elm,action,click", "");
1139                }
1140             }
1141          }
1142          program {
1143             name: "play_sample";
1144             action: RUN_PLUGIN "touch_sound";
1145          }
1146          program { name: "disable";
1147             signal: "elm,state,disabled";
1148             source: "elm";
1149             action: STATE_SET "disabled" 0.0;
1150             target: "event";
1151             target: "bg";
1152          }
1153          program { name: "enable";
1154             signal: "elm,state,enabled";
1155             source: "elm";
1156             action: STATE_SET "default" 0.0;
1157             target: "event";
1158             target: "bg";
1159          }
1160       }
1161    }
1162
1163    group { name: "elm/button/base/select_mode";
1164       alias: "elm/button/base/list_number";
1165       alias: "elm/button/base/edit_mode";
1166       images{
1167          image: "tw_list_number_bg.#.png" COMP;
1168          image: "tw_list_number_ef.#.png" COMP;
1169       }
1170       script {
1171          public mouse_down = 0;
1172          public multi_down = 0;
1173       }
1174       parts {
1175          part { name: "base";
1176             type: SPACER;
1177             scale: 1;
1178             description { state: "default" 0.0;
1179                min: BUTTON_LIST_SELECT_MODE_SIZE_INC;
1180             }
1181          }
1182          part { name: "lt_padding";
1183             type: SPACER;
1184             scale: 1;
1185             description { state: "default" 0.0;
1186                align: 0.0 0.0;
1187                rel1 {
1188                   relative: 0.0 0.0;
1189                   to: "base";
1190                }
1191                rel2 {
1192                   relative: 0.0 0.0;
1193                   to: "base";
1194                }
1195                min: BUTTON_LIST_SELECT_MODE_PADDING_LT_SIZE_INC;
1196                fixed: 1 1;
1197             }
1198          }
1199          part { name: "rb_padding";
1200             type: SPACER;
1201             scale: 1;
1202             description { state: "default" 0.0;
1203                align: 1.0 1.0;
1204                rel1 {
1205                   relative: 1.0 1.0;
1206                   to: "base";
1207                }
1208                rel2 {
1209                   relative: 1.0 1.0;
1210                   to: "base";
1211                }
1212                min: BUTTON_LIST_SELECT_MODE_PADDING_RB_SIZE_INC;
1213                fixed: 1 1;
1214             }
1215          }
1216          part { name: "bg";
1217             type: IMAGE;
1218             scale: 1;
1219             mouse_events: 0;
1220             description { state: "default" 0.0;
1221                image.normal: "tw_list_number_bg.#.png";
1222                rel1.to: "base";
1223                rel2.to: "base";
1224                min: BUTTON_LIST_SELECT_MODE_SIZE_INC;
1225                color: 1 55 91 255; /*(Changeable UI) color_class: "B2011";*/
1226             }
1227             description { state: "pressed" 0.0;
1228                inherit: "default" 0.0;
1229                color: 22 73 114 255; /*(Changeable UI) color_class: "B2011P";*/
1230             }
1231             description { state: "disabled" 0.0;
1232                inherit: "default" 0.0;
1233             }
1234          }
1235          part { name: "ef";
1236             type: IMAGE;
1237             scale: 1;
1238             mouse_events: 0;
1239             description { state: "default" 0.0;
1240                image.normal: "tw_list_number_ef.#.png";
1241                rel1.to: "base";
1242                rel2.to: "base";
1243                min: BUTTON_LIST_SELECT_MODE_SIZE_INC;
1244                color: 7 7 7 255; /*(Changeable UI) color_class: "B2013";*/
1245             }
1246             description { state: "pressed" 0.0;
1247                inherit: "default" 0.0;
1248             }
1249             description { state: "disabled" 0.0;
1250                inherit: "default" 0.0;
1251             }
1252          }
1253          part { name: "elm.swallow.content";
1254             type: SWALLOW;
1255             clip_to: "elm.swallow.content.clip";
1256             scale: 1;
1257             description { state: "default" 0.0;
1258                visible: 0;
1259                fixed: 0 1;
1260                align: 0.5 0.0;
1261                min: 0 BUTTON_LIST_SELECT_MODE_BOTTOM_CONTENT_HEIGHT_INC;
1262                rel1 {
1263                   relative: 0.0 1.0;
1264                   to: "lt_padding";
1265                }
1266                rel2 {
1267                   relative: 1.0 1.0;
1268                   to: "rb_padding";
1269                }
1270             }
1271             description { state: "visible" 0.0;
1272                inherit: "default" 0.0;
1273             }
1274             description { state: "icononly" 0.0;
1275                inherit: "default" 0.0;
1276             }
1277          }
1278          part { name: "elm.text";
1279             type: TEXTBLOCK;
1280             mouse_events: 0;
1281             scale: 1;
1282             description { state: "default" 0.0;
1283                align: 0.5 0.5;
1284                min: 0 BUTTON_LIST_SELECT_MODE_TEXT_HEIGHT_INC;
1285                max: BUTTON_LIST_SELECT_MODE_TEXT_WIDTH_INC BUTTON_LIST_SELECT_MODE_TEXT_HEIGHT_INC;
1286                rel1 {
1287                   relative: 1.0 1.0;
1288                   to: "lt_padding";;
1289                }
1290                rel2 {
1291                   relative: 0.0 0.0;
1292                   to: "rb_padding";;
1293                }
1294                text {
1295                   min: 1 0;
1296                   style: "button_list_select_mode_text_normal";
1297                }
1298             }
1299             description { state: "disabled" 0.0;
1300                inherit: "default" 0.0;
1301             }
1302             description { state: "pressed" 0.0;
1303                inherit: "default" 0.0;
1304                text.style: "button_list_select_mode_text_press";
1305             }
1306          }         part { name: "elm.swallow.content.clip";
1307             type: RECT;
1308             scale: 1;
1309             description { state: "default" 0.0;
1310             }
1311             description { state: "disabled" 0.0;
1312                inherit: "default" 0.0;
1313             }
1314          }
1315          part { name: "event";
1316             type: RECT;
1317             scale: 1;
1318             description { state: "default" 0.0;
1319                color: 0 0 0 0;
1320                rel1.to: "base";
1321                rel2.to: "base";
1322             }
1323          }
1324       }
1325       programs {
1326          program { name: "pressed";
1327             signal: "mouse,down,1*";
1328             source: "event";
1329             script {
1330                if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0))
1331                  {
1332                      set_int(mouse_down, 1);
1333                      run_program(PROGRAM:"button_press1");
1334                  }
1335             }
1336          }
1337          program { name: "button_press1";
1338             script {
1339                new st[31];
1340                new Float:vl;
1341                get_state(PART:"bg", st, 30, vl);
1342                if (strcmp(st, "disabled")) {
1343                   set_state(PART:"bg", "pressed", 0.0);
1344                   set_state(PART:"elm.text", "pressed", 0.0);
1345                   emit("elm,action,press", "");
1346                }
1347             }
1348          }
1349          program { name: "unpressed";
1350             signal: "mouse,up,1";
1351             source: "event";
1352             script {
1353                if (get_int(mouse_down) == 1) {
1354                  set_int(mouse_down, 0);
1355                  run_program(PROGRAM:"button_unpress1");
1356                }
1357             }
1358          }
1359          program { name: "button_unpress1";
1360             script {
1361                new st[31];
1362                new Float:vl;
1363                get_state(PART:"bg", st, 30, vl);
1364                if (strcmp(st, "disabled")) {
1365                   set_state(PART:"bg", "default", 0.0);
1366                   set_state(PART:"elm.text", "default", 0.0);
1367                   emit("elm,action,unpress", "");
1368                }
1369             }
1370          }
1371          program { name: "touch_snd";
1372             signal: "mouse,clicked,1";
1373             source: "event";
1374             script {
1375                new st[31];
1376                new Float:vl;
1377                if (get_int(multi_down) == 0) {
1378                   get_state(PART:"bg", st, 30, vl);
1379                   if (strcmp(st, "disabled")) {
1380                      run_program(PROGRAM:"play_sample");
1381                      emit("elm,action,click", "");
1382                   }
1383                }
1384             }
1385          }
1386          program {
1387             name: "play_sample";
1388             action: RUN_PLUGIN "touch_sound";
1389          }
1390          program { name: "text_show";
1391             signal: "elm,state,text,visible";
1392             source: "elm";
1393             script {
1394                new st[31];
1395                new Float:vl;
1396                get_state(PART:"elm.swallow.content", st, 30, vl);
1397                if (!strcmp(st, "icononly"))
1398                  {
1399                     set_state(PART:"elm.swallow.content", "visible", 0.0);
1400                  }
1401                get_state(PART:"bg", st, 30, vl);
1402                if (strcmp(st, "disabled"))
1403                   set_state(PART:"elm.text", "default", 0.0);
1404                else
1405                   set_state(PART:"elm.text", "disabled", 0.0);
1406             }
1407          }
1408          program { name: "text_hide";
1409             signal: "elm,state,text,hidden";
1410             source: "elm";
1411             script {
1412                new st[31];
1413                new Float:vl;
1414                get_state(PART:"elm.swallow.content", st, 30, vl);
1415                if (!strcmp(st, "visible"))
1416                  {
1417                     set_state(PART:"elm.swallow.content", "icononly", 0.0);
1418                  }
1419                set_state(PART:"elm.text", "default", 0.0);
1420             }
1421          }
1422          program { name: "icon_show";
1423             signal: "elm,state,icon,visible";
1424             source: "elm";
1425             action: STATE_SET "visible" 0.0;
1426             target: "elm.swallow.content";
1427          }
1428          program { name: "icon_hide";
1429             signal: "elm,state,icon,hidden";
1430             source: "elm";
1431             action: STATE_SET "default" 0.0;
1432             target: "elm.swallow.content";
1433          }
1434          program { name: "disable";
1435             signal: "elm,state,disabled";
1436             source: "elm";
1437             action: STATE_SET "disabled" 0.0;
1438             target: "bg";
1439             target: "elm.swallow.content.clip";
1440             target: "elm.text";
1441          }
1442          program { name: "enable";
1443             signal: "elm,state,enabled";
1444             source: "elm";
1445             action: STATE_SET "default" 0.0;
1446             target: "bg";
1447             target: "elm.swallow.content.clip";
1448             target: "elm.text";
1449          }
1450          program { name: "multi_down";
1451             signal: "elm,action,multi,down";
1452             source: "elm";
1453             script {
1454                set_int(multi_down, 1);
1455             }
1456          }
1457          program { name: "multi_up";
1458             signal: "elm,action,multi,up";
1459             source: "elm";
1460             script {
1461                set_int(multi_down, 0);
1462             }
1463          }
1464       }
1465    }
1466
1467    /* This transparent button style is used by applications which use webview. */
1468    group{ name: "elm/button/base/transparent";
1469        script {
1470          public mouse_down = 0;
1471          public multi_down = 0;
1472        }
1473        parts {
1474          part { name: "bg";
1475             type: SPACER;
1476             scale: 1;
1477             description { state: "default" 0.0;
1478             }
1479             description { state: "disabled" 0.0;
1480                inherit: "default" 0.0;
1481             }
1482          }
1483          part { name: "elm.swallow.content";
1484             type: SWALLOW;
1485             scale: 1;
1486             description { state: "default" 0.0;
1487             }
1488          }
1489         part { name: "event";
1490             type: RECT;
1491             scale: 1;
1492             /* Do not remove the following line.
1493              * elm.swallow.content part should receive mouse events. */
1494             repeat_events: 1;
1495             description { state: "default" 0.0;
1496               color: 0 0 0 0;
1497             }
1498          }
1499       }
1500       programs {
1501          program { name: "pressed";
1502             signal: "mouse,down,1*";
1503             source: "event";
1504             script {
1505                if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0))
1506                  {
1507                      set_int(mouse_down, 1);
1508                      run_program(PROGRAM:"button_press1");
1509                  }
1510             }
1511          }
1512          program { name: "button_press1";
1513             script {
1514                new st[31];
1515                new Float:vl;
1516                get_state(PART:"bg", st, 30, vl);
1517                if (strcmp(st, "disabled")) {
1518                   emit("elm,action,press", "");
1519                }
1520             }
1521          }
1522          program { name: "unpressed";
1523             signal: "mouse,up,1";
1524             source: "event";
1525             script {
1526                if (get_int(mouse_down) == 1) {
1527                  set_int(mouse_down, 0);
1528                  run_program(PROGRAM:"button_unpress1");
1529                }
1530             }
1531          }
1532          program { name: "button_unpress1";
1533             script {
1534                new st[31];
1535                new Float:vl;
1536                get_state(PART:"bg", st, 30, vl);
1537                if (strcmp(st, "disabled")) {
1538                   emit("elm,action,unpress", "");
1539                }
1540             }
1541          }
1542          program { name: "touch_snd";
1543             signal: "mouse,clicked,1";
1544             source: "event";
1545             script {
1546                new st[31];
1547                new Float:vl;
1548                if (get_int(multi_down) == 0) {
1549                   get_state(PART:"bg", st, 30, vl);
1550                   if (strcmp(st, "disabled")) {
1551                      run_program(PROGRAM:"touch_sound");
1552                      emit("elm,action,click", "");
1553                   }
1554                }
1555             }
1556          }
1557          program { name: "touch_sound";
1558             action: RUN_PLUGIN "touch_sound";
1559          }
1560          program { name: "disable";
1561             signal: "elm,state,disabled";
1562             source: "elm";
1563             action: STATE_SET "disabled" 0.0;
1564             target: "bg";
1565          }
1566          program { name: "enable";
1567             signal: "elm,state,enabled";
1568             source: "elm";
1569             action: STATE_SET "default" 0.0;
1570             target: "bg";
1571          }
1572          program { name: "multi_down";
1573             signal: "elm,action,multi,down";
1574             source: "elm";
1575             script {
1576                set_int(multi_down, 1);
1577             }
1578          }
1579          program { name: "multi_up";
1580             signal: "elm,action,multi,up";
1581             source: "elm";
1582             script {
1583                set_int(multi_down, 0);
1584             }
1585          }
1586       }
1587    }
1588
1589    group { name: "elm/button/base/bottom";
1590       alias: "elm/button/base/bottom/queue";
1591       images {
1592          image: "tw_bottom_btn_press_bg.png" COMP;
1593       }
1594       script {
1595          public mouse_down = 0;
1596          public multi_down = 0;
1597       }
1598       parts {
1599          part { name: "padding";
1600             type: "SPACER";
1601             scale: 1;
1602             mouse_events: 0;
1603             description { state: "default" 0.0;
1604                fixed: 1 1;
1605                min: 0 BUTTON_BOTTOM_EFFECT_PADDING_SIZE_INC;
1606                rel1.relative: 0.5 1.0;
1607                rel2.relative: 0.5 1.0;
1608                align: 0.5 0.0;
1609             }
1610          }
1611          part { name: "elm.content.bg";
1612             scale: 1;
1613             mouse_events: 0;
1614             repeat_events: 1;
1615             description { state: "default" 0.0;
1616                fixed: 1 1;
1617                min: BUTTON_BOTTOM_SIZE_INC;
1618                image.normal: "tw_bottom_btn_press_bg.png";
1619                rel1.to: "padding";
1620                rel1.relative: 0.5 1.0;
1621                rel2.to: "padding";
1622                rel2.relative: 0.5 1.0;
1623                align: 0.5 1.0;
1624                color: 0 44 76 255; /*(Changeable UI) color_class: "B065L4";*/
1625             }
1626             description { state: "pressed" 0.0;
1627                inherit: "default" 0.0;
1628                rel1.relative: 0.5 0.0;
1629                rel2.relative: 0.5 0.0;
1630                color: 0 148 255 127; /*(Changeable UI) color_class: "B065L4P";*/
1631             }
1632             description { state: "disabled" 0.0;
1633                inherit: "default" 0.0;
1634                color: 33 33 33 255; /*(Changeable UI) color_class: "B065L4D";*/
1635             }
1636          }
1637          part { name: "icon_top_padding";
1638             type: SPACER;
1639             scale: 1;
1640             description { state: "default" 0.0;
1641                min: 0 BUTTON_BOTTOM_ICON_TOP_PADDING_INC;
1642                max: -1 BUTTON_BOTTOM_ICON_TOP_PADDING_INC;
1643                rel1.to: "elm.content.bg";
1644                rel1.relative: 0.0 0.0;
1645                rel2.to: "elm.content.bg";
1646                rel2.relative: 1.0 0.0;
1647                align: 0.5 0.0;
1648             }
1649          }
1650          part { name: "elm.swallow.content";
1651             type: SWALLOW;
1652             clip_to: "elm.swallow.content.clip";
1653             scale: 1;
1654             description { state: "default" 0.0;
1655                visible: 1;
1656                align: 0.5 0.0;
1657                rel1 {
1658                   relative: 0.0 1.0;
1659                   to: "icon_top_padding";
1660                }
1661                rel2 {
1662                   relative: 1.0 1.0;
1663                   to: "icon_top_padding";
1664                }
1665                min: BUTTON_BOTTOM_ICON_SIZE_INC;
1666                max: BUTTON_BOTTOM_ICON_SIZE_INC;
1667                fixed: 0 1;
1668             }
1669          }
1670          part { name: "elm.swallow.content.clip";
1671             type: RECT;
1672             scale: 1;
1673             description { state: "default" 0.0;
1674                rel1 {
1675                   to: "elm.swallow.content";
1676                }
1677                rel2 {
1678                   to: "elm.swallow.content";
1679                }
1680                color: 0 148 255 255; /*(Changeable UI) color_class: "F022L1i";*/
1681             }
1682             description { state: "disabled" 0.0;
1683                inherit: "default" 0.0;
1684                color: 249 249 249 76; /*(Changeable UI) color_class: "F022L1iD";*/
1685             }
1686          }
1687          part { name: "text_left_top_padding";
1688             type: SPACER;
1689             scale: 1;
1690             description { state: "default" 0.0;
1691                min: BUTTON_BOTTOM_TEXT_LR_PADDING_INC BUTTON_BOTTOM_TEXT_TOP_PADDING_INC;
1692                max: BUTTON_BOTTOM_TEXT_LR_PADDING_INC BUTTON_BOTTOM_TEXT_TOP_PADDING_INC;
1693                rel1.to: "elm.content.bg";
1694                rel2.to: "elm.content.bg";
1695                align: 0.0 0.0;
1696                fixed: 1 1;
1697             }
1698          }
1699          part { name: "text_right_bottom_padding";
1700             type: SPACER;
1701             scale: 1;
1702             description { state: "default" 0.0;
1703                min: BUTTON_BOTTOM_TEXT_LR_PADDING_INC BUTTON_BOTTOM_TEXT_BOTTOM_PADDING_INC;
1704                max: BUTTON_BOTTOM_TEXT_LR_PADDING_INC BUTTON_BOTTOM_TEXT_BOTTOM_PADDING_INC;
1705                rel1.to: "elm.content.bg";
1706                rel2.to: "elm.content.bg";
1707                align: 1.0 1.0;
1708                fixed: 1 1;
1709             }
1710          }
1711          part { name: "elm.text";
1712             type: TEXTBLOCK;
1713             mouse_events: 0;
1714             scale: 1;
1715             description { state: "default" 0.0;
1716                align: 0.5 0.5;
1717                fixed: 0 1;
1718                min: 0 BUTTON_BOTTOM_TEXT_HEIGHT_INC;
1719                rel1 {
1720                   relative: 1.0 1.0;
1721                   to: "text_left_top_padding";
1722                }
1723                rel2 {
1724                   relative: 0.0 0.0;
1725                   to: "text_right_bottom_padding";
1726                }
1727                text {
1728                   max: 1 0;
1729                   style: "button_general_text_normal";
1730                }
1731             }
1732             description { state: "disabled" 0.0;
1733                inherit: "default" 0.0;
1734                text.style: "button_general_text_dim";
1735             }
1736             description { state: "pressed" 0.0;
1737                inherit: "default" 0.0;
1738                text.style: "button_general_text_press";
1739             }
1740          }
1741          part { name: "event";
1742             type: RECT;
1743             scale: 1;
1744             description { state: "default" 0.0;
1745                color: 0 0 0 0;
1746                rel1.to: "elm.content.bg";
1747                rel2.to: "elm.content.bg";
1748             }
1749          }
1750       }
1751       programs {
1752          program { name: "pressed";
1753             signal: "mouse,down,1*";
1754             source: "event";
1755             script {
1756                if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0)) {
1757                   set_int(mouse_down, 1);
1758                   run_program(PROGRAM:"button_press1");
1759                }
1760             }
1761          }
1762          program { name: "button_press1";
1763             script {
1764                new st[31];
1765                new Float:vl;
1766                get_state(PART:"elm.content.bg", st, 30, vl);
1767                if (strcmp(st, "disabled")) {
1768                   run_program(PROGRAM:"pressed_effect");
1769                   emit("elm,action,press", "");
1770                }
1771             }
1772          }
1773          program { name: "pressed_effect";
1774             action: STATE_SET "pressed" 0.0;
1775             transition: CUBIC_BEZIER 0.25 0.45 0.03 0.41 1.0;
1776             target: "elm.content.bg";
1777          }
1778          program { name: "unpressed";
1779             signal: "mouse,up,1";
1780             source: "event";
1781             script {
1782                if (get_int(mouse_down) == 1) {
1783                   set_int(mouse_down, 0);
1784                   run_program(PROGRAM:"button_unpress1");
1785                }
1786             }
1787          }
1788          program { name: "button_unpress1";
1789             script {
1790                new st[31];
1791                new Float:vl;
1792                get_state(PART:"elm.content.bg", st, 30, vl);
1793                if (strcmp(st, "disabled")) {
1794                   run_program(PROGRAM:"unpressed_effect");
1795                   emit("elm,action,unpress", "");
1796                }
1797             }
1798          }
1799          program { name: "unpressed_effect";
1800             action: STATE_SET "default" 0.0;
1801             transition: CUBIC_BEZIER 0.25 0.45 0.03 0.41 1.0;
1802             target: "elm.content.bg";
1803          }
1804          program { name: "touch_snd";
1805             signal: "mouse,clicked,1";
1806             source: "event";
1807             script {
1808                new st[31];
1809                new Float:vl;
1810                if (get_int(multi_down) == 0) {
1811                   get_state(PART:"elm.content.bg", st, 30, vl);
1812                   if (strcmp(st, "disabled")) {
1813                      run_program(PROGRAM:"play_sample");
1814                      emit("elm,action,click", "");
1815                   }
1816                }
1817             }
1818          }
1819          program {
1820             name: "play_sample";
1821             action: RUN_PLUGIN "touch_sound";
1822          }
1823          program { name: "disable";
1824             signal: "elm,state,disabled";
1825             source: "elm";
1826             action: STATE_SET "disabled" 0.0;
1827             target: "elm.content.bg";
1828             target: "elm.swallow.content.clip";
1829          }
1830          program { name: "enable";
1831             signal: "elm,state,enabled";
1832             source: "elm";
1833             action: STATE_SET "default" 0.0;
1834             target: "elm.content.bg";
1835             target: "elm.swallow.content.clip";
1836          }
1837          program { name: "multi_down";
1838             signal: "elm,action,multi,down";
1839             source: "elm";
1840             script {
1841                set_int(multi_down, 1);
1842             }
1843          }
1844          program { name: "multi_up";
1845             signal: "elm,action,multi,up";
1846             source: "elm";
1847             script {
1848                set_int(multi_down, 0);
1849             }
1850          }
1851       }
1852    }
1853 group { name: "elm/button/base/action";
1854    images {
1855       image: "b_more_option_btn_bg.png" COMP;
1856    }
1857    script {
1858       public mouse_down = 0;
1859       public multi_down = 0;
1860    }
1861    parts {
1862       part { name: "base";
1863          type: SPACER;
1864          scale: 1;
1865          description { state: "default" 0.0;
1866             min: BUTTON_ACTION_WIDTH_INC BUTTON_ACTION_WIDTH_INC;
1867             max: BUTTON_ACTION_WIDTH_INC BUTTON_ACTION_WIDTH_INC;
1868          }
1869       }
1870       part { name: "bg";
1871          scale: 1;
1872          description { state: "default" 0.0;
1873             rel1.to: "base";
1874             rel2.to: "base";
1875             image.normal: "b_more_option_btn_bg.png";
1876             color: 249 249 249 255;
1877             map.on: 1;
1878          }
1879          description { state: "disabled" 0.0;
1880             inherit: "default" 0.0;
1881             color: 76 76 76 255;
1882          }
1883       }
1884       part { name: "press_bg";
1885          scale: 1;
1886          description { state: "default" 0.0;
1887             rel1.to: "base";
1888             rel2.to: "base";
1889             image.normal: "b_more_option_btn_bg.png";
1890             color: 0 0 0 0;
1891             map.on: 1;
1892          }
1893          description { state: "pressed" 0.0;
1894             inherit: "default" 0.0;
1895             color: 127 127 127 255;
1896             map {
1897                zoom.x: 0.8;
1898                zoom.y: 0.8;
1899             }
1900          }
1901          description { state: "disabled" 0.0;
1902             inherit: "default" 0.0;
1903          }
1904          description { state: "start_persp" 0.0;
1905             inherit: "default" 0.0;
1906             color: 127 127 127 255;
1907             map {
1908                zoom.x: 1.0;
1909                zoom.y: 1.0;
1910             }
1911          }
1912          description { state: "end_persp" 0.0;
1913             inherit: "default" 0.0;
1914             color: 0 0 0 0;
1915             map {
1916                zoom.x: 1.0;
1917                zoom.y: 1.0;
1918             }
1919          }
1920       }
1921       part { name: "elm.swallow.content";
1922          type: SWALLOW;
1923          clip_to: "elm.swallow.content.clip";
1924          scale: 1;
1925          description { state: "default" 0.0;
1926             rel1.to: "base";
1927             rel2.to: "base";
1928          }
1929       }
1930       part { name: "elm.swallow.content.clip";
1931          type: RECT;
1932          scale: 1;
1933          description { state: "default" 0.0;
1934             color: 20 20 20 255;
1935          }
1936          description { state: "pressed" 0.0;
1937             inherit: "default" 0.0;
1938             color: 20 20 20 255;
1939          }
1940          description { state: "disabled" 0.0;
1941             inherit: "default" 0.0;
1942             color: 51 51 51 255;
1943          }
1944       }
1945       part { name: "event";
1946          type: RECT;
1947          scale: 1;
1948          description { state: "default" 0.0;
1949             color: 0 0 0 0;
1950             rel1.to: "base";
1951             rel2.to: "base";
1952          }
1953       }
1954    }
1955    programs {
1956       program { name: "pressed";
1957          signal: "mouse,down,1*";
1958          source: "event";
1959          script {
1960             if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0))
1961             {
1962                set_int(mouse_down, 1);
1963                run_program(PROGRAM:"button_press1");
1964             }
1965          }
1966       }
1967       program { name: "button_press1";
1968          script {
1969             new st[31];
1970             new Float:vl;
1971             get_state(PART:"bg", st, 30, vl);
1972             if (strcmp(st, "disabled")) {
1973                set_state(PART:"elm.swallow.content.clip", "pressed", 0.0);
1974                set_state(PART:"press_bg", "pressed", 0.0);
1975                run_program(PROGRAM:"start_persp");
1976                emit("elm,action,press", "");
1977             }
1978          }
1979       }
1980       program { name: "unpressed";
1981          signal: "mouse,up,1";
1982          source: "event";
1983          script {
1984             if (get_int(mouse_down) == 1) {
1985                set_int(mouse_down, 0);
1986                run_program(PROGRAM:"button_unpress1");
1987             }
1988          }
1989       }
1990       program { name: "button_unpress1";
1991          script {
1992             new st[31];
1993             new Float:vl;
1994             get_state(PART:"bg", st, 30, vl);
1995             if (strcmp(st, "disabled")) {
1996                set_state(PART:"elm.swallow.content.clip", "default", 0.0);
1997                run_program(PROGRAM:"end_persp");
1998                emit("elm,action,unpress", "");
1999             }
2000          }
2001       }
2002       program { name: "touch_snd";
2003          signal: "mouse,clicked,1";
2004          source: "event";
2005          script {
2006             new st[31];
2007             new Float:vl;
2008             if (get_int(multi_down) == 0) {
2009                get_state(PART:"bg", st, 30, vl);
2010                if (strcmp(st, "disabled")) {
2011                   run_program(PROGRAM:"play_sample");
2012                   emit("elm,action,click", "");
2013                }
2014             }
2015          }
2016       }
2017       program {
2018          name: "play_sample";
2019          action: RUN_PLUGIN "touch_sound";
2020       }
2021       program { name: "disable";
2022          signal: "elm,state,disabled";
2023          source: "elm";
2024          action: STATE_SET "disabled" 0.0;
2025          target: "elm.swallow.content.clip";
2026          target: "bg";
2027       }
2028       program { name: "enable";
2029          signal: "elm,state,enabled";
2030          source: "elm";
2031          action: STATE_SET "default" 0.0;
2032          target: "elm.swallow.content.clip";
2033          target: "bg";
2034       }
2035       program { name: "multi_down";
2036          signal: "elm,action,multi,down";
2037          source: "elm";
2038          script {
2039             set_int(multi_down, 1);
2040          }
2041       }
2042       program { name: "multi_up";
2043          signal: "elm,action,multi,up";
2044          source: "elm";
2045          script {
2046             set_int(multi_down, 0);
2047          }
2048       }
2049       program { name: "start_persp";
2050          action: STATE_SET "start_persp" 0.0;
2051          transition: CUBIC_BEZIER 0.2 0.45 0.03 0.41 1.0;
2052          target: "press_bg";
2053       }
2054       program { name: "end_persp";
2055          action: STATE_SET "end_persp" 0.0;
2056          transition: CUBIC_BEZIER 0.2 0.45 0.03 0.41 1.0;
2057          target: "press_bg";
2058       }
2059    }
2060 }
2061
2062 group { name: "elm/button/base/effect";
2063    images {
2064       image: "b_ic_press_full_circle_bg.png" COMP;
2065    }
2066    script {
2067       public mouse_down = 0;
2068       public mouse_click = 0;
2069       public multi_down = 0;
2070       public click_cnt = 0;
2071       public timer0(val) {
2072         if(val == 1)
2073            run_program(PROGRAM:"change_opacity");
2074         else if(val == 2)
2075            run_program(PROGRAM:"change_opacity2");
2076         else if(val == 3)
2077            run_program(PROGRAM:"change_opacity3");
2078         else
2079            run_program(PROGRAM:"change_opacity4");
2080       }
2081    }
2082    parts {
2083       part { name: "base";
2084          type: SPACER;
2085          scale: 1;
2086          description { state: "default" 0.0;
2087          }
2088       }
2089       part { name: "bg";
2090          type: SWALLOW;
2091          scale: 1;
2092          description { state: "default" 0.0;
2093             rel1.to: "base";
2094             rel2.to: "base";
2095          }
2096       }
2097       part { name: "effect_bg";
2098          scale: 1;
2099          clip_to: "effect_bg_clip";
2100          description { state: "default" 0.0;
2101             rel1.to: "base";
2102             rel2.to: "base";
2103             image.normal: "b_ic_press_full_circle_bg.png";
2104             color: 249 249 249 10;
2105             map.on: 1;
2106          }
2107          description { state: "pressed" 0.0;
2108             inherit: "default" 0.0;
2109             color: 249 249 249 10;
2110             map {
2111                zoom.x: 0.8;
2112                zoom.y: 0.8;
2113             }
2114          }
2115          description { state: "disabled" 0.0;
2116             inherit: "default" 0.0;
2117          }
2118          description { state: "start_persp" 0.0;
2119             inherit: "default" 0.0;
2120             color: 249 249 249 10;
2121             map {
2122                zoom.x: 1.0;
2123                zoom.y: 1.0;
2124             }
2125          }
2126       }
2127       part { name: "effect_bg_clip";
2128          scale: 1;
2129          type: RECT;
2130          description { state: "default" 0.0;
2131             rel1.to: "base";
2132             rel2.to: "base";
2133             color: 255 255 255 0;
2134          }
2135          description { state: "pressed" 0.0;
2136             inherit: "default" 0.0;
2137             color: 255 255 255 255;
2138          }
2139          description { state: "disabled" 0.0;
2140             inherit: "default" 0.0;
2141          }
2142       }
2143       part { name: "effect_bg2";
2144          scale: 1;
2145          clip_to: "effect_bg_clip2";
2146          description { state: "default" 0.0;
2147             rel1.to: "base";
2148             rel2.to: "base";
2149             image.normal: "b_ic_press_full_circle_bg.png";
2150             color: 0 0 0 0;
2151             map.on: 1;
2152          }
2153          description { state: "pressed" 0.0;
2154             inherit: "default" 0.0;
2155             color: 249 249 249 10;
2156             map {
2157                zoom.x: 0.8;
2158                zoom.y: 0.8;
2159             }
2160          }
2161          description { state: "disabled" 0.0;
2162             inherit: "default" 0.0;
2163          }
2164          description { state: "start_persp" 0.0;
2165             inherit: "default" 0.0;
2166             color: 249 249 249 10;
2167             map {
2168                zoom.x: 1.0;
2169                zoom.y: 1.0;
2170             }
2171          }
2172       }
2173       part { name: "effect_bg_clip2";
2174          scale: 1;
2175          type: RECT;
2176          description { state: "default" 0.0;
2177             rel1.to: "base";
2178             rel2.to: "base";
2179             color: 255 255 255 0;
2180          }
2181          description { state: "pressed" 0.0;
2182             inherit: "default" 0.0;
2183             color: 255 255 255 255;
2184          }
2185          description { state: "disabled" 0.0;
2186             inherit: "default" 0.0;
2187          }
2188       }
2189       part { name: "effect_bg3";
2190          scale: 1;
2191          clip_to: "effect_bg_clip3";
2192          description { state: "default" 0.0;
2193             rel1.to: "base";
2194             rel2.to: "base";
2195             image.normal: "b_ic_press_full_circle_bg.png";
2196             color: 0 0 0 0;
2197             map.on: 1;
2198          }
2199          description { state: "pressed" 0.0;
2200             inherit: "default" 0.0;
2201             color: 249 249 249 10;
2202             map {
2203                zoom.x: 0.8;
2204                zoom.y: 0.8;
2205             }
2206          }
2207          description { state: "disabled" 0.0;
2208             inherit: "default" 0.0;
2209          }
2210          description { state: "start_persp" 0.0;
2211             inherit: "default" 0.0;
2212             color: 249 249 249 10;
2213             map {
2214                zoom.x: 1.0;
2215                zoom.y: 1.0;
2216             }
2217          }
2218       }
2219       part { name: "effect_bg_clip3";
2220          scale: 1;
2221          type: RECT;
2222          description { state: "default" 0.0;
2223             rel1.to: "base";
2224             rel2.to: "base";
2225             color: 255 255 255 0;
2226          }
2227          description { state: "pressed" 0.0;
2228             inherit: "default" 0.0;
2229             color: 255 255 255 255;
2230          }
2231          description { state: "disabled" 0.0;
2232             inherit: "default" 0.0;
2233          }
2234       }
2235       part { name: "effect_bg4";
2236          scale: 1;
2237          clip_to: "effect_bg_clip4";
2238          description { state: "default" 0.0;
2239             rel1.to: "base";
2240             rel2.to: "base";
2241             image.normal: "b_ic_press_full_circle_bg.png";
2242             color: 0 0 0 0;
2243             map.on: 1;
2244          }
2245          description { state: "pressed" 0.0;
2246             inherit: "default" 0.0;
2247             color: 249 249 249 10;
2248             map {
2249                zoom.x: 0.8;
2250                zoom.y: 0.8;
2251             }
2252          }
2253          description { state: "disabled" 0.0;
2254             inherit: "default" 0.0;
2255          }
2256          description { state: "start_persp" 0.0;
2257             inherit: "default" 0.0;
2258             color: 249 249 249 10;
2259             map {
2260                zoom.x: 1.0;
2261                zoom.y: 1.0;
2262             }
2263          }
2264       }
2265       part { name: "effect_bg_clip4";
2266          scale: 1;
2267          type: RECT;
2268          description { state: "default" 0.0;
2269             rel1.to: "base";
2270             rel2.to: "base";
2271             color: 255 255 255 0;
2272          }
2273          description { state: "pressed" 0.0;
2274             inherit: "default" 0.0;
2275             color: 255 255 255 255;
2276          }
2277          description { state: "disabled" 0.0;
2278             inherit: "default" 0.0;
2279          }
2280       }
2281       part { name: "elm.swallow.content";
2282          type: SWALLOW;
2283          clip_to: "elm.swallow.content.clip";
2284          scale: 1;
2285          description { state: "default" 0.0;
2286          }
2287       }
2288       part { name: "elm.swallow.content.clip";
2289          type: RECT;
2290          scale: 1;
2291          description { state: "default" 0.0;
2292             color: 249 249 249 255;
2293          }
2294          description { state: "pressed" 0.0;
2295             inherit: "default" 0.0;
2296             color: 249 249 249 255;
2297          }
2298          description { state: "disabled" 0.0;
2299             inherit: "default" 0.0;
2300             color: 0 0 0 0;
2301          }
2302       }
2303       part { name: "event";
2304          type: RECT;
2305          scale: 1;
2306          description { state: "default" 0.0;
2307             color: 0 0 0 0;
2308             rel1.to: "base";
2309             rel2.to: "base";
2310          }
2311       }
2312    }
2313    programs {
2314       program { name: "pressed";
2315          signal: "mouse,down,1*";
2316          source: "event";
2317          script {
2318             if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0))
2319             {
2320                set_int(mouse_down, 1);
2321                run_program(PROGRAM:"button_press1");
2322             }
2323          }
2324       }
2325       program { name: "button_press1";
2326          script {
2327             new st[31];
2328             new Float:vl;
2329             get_state(PART:"effect_bg", st, 30, vl);
2330             if (strcmp(st, "disabled")) {
2331                set_state(PART:"elm.swallow.content.clip", "pressed", 0.0);
2332                emit("elm,action,press", "");
2333                if(get_int(click_cnt) == 0) {
2334                   set_state(PART:"effect_bg", "pressed", 0.0);
2335                   set_state(PART:"effect_bg_clip", "pressed", 0.0);
2336                   run_program(PROGRAM:"start_persp");
2337                   timer(0.35, "timer0", 1);
2338                }
2339                else if(get_int(click_cnt) == 1) {
2340                   set_state(PART:"effect_bg2", "pressed", 0.0);
2341                   set_state(PART:"effect_bg_clip2", "pressed", 0.0);
2342                   run_program(PROGRAM:"start_persp2");
2343                   timer(0.35, "timer0", 2);
2344                }
2345                else if(get_int(click_cnt) == 2) {
2346                   set_state(PART:"effect_bg3", "pressed", 0.0);
2347                   set_state(PART:"effect_bg_clip3", "pressed", 0.0);
2348                   run_program(PROGRAM:"start_persp3");
2349                   timer(0.35, "timer0", 3);
2350                }
2351                else {
2352                   set_state(PART:"effect_bg4", "pressed", 0.0);
2353                   set_state(PART:"effect_bg_clip4", "pressed", 0.0);
2354                   run_program(PROGRAM:"start_persp4");
2355                   timer(0.35, "timer0", 4);
2356                }
2357             }
2358          }
2359       }
2360       program { name: "unpressed";
2361          signal: "mouse,up,1";
2362          source: "event";
2363          script {
2364             if (get_int(mouse_down) == 1) {
2365                set_int(mouse_down, 0);
2366                run_program(PROGRAM:"button_unpress1");
2367             }
2368          }
2369       }
2370       program { name: "button_unpress1";
2371          script {
2372             new st[31];
2373             new Float:vl;
2374             get_state(PART:"effect_bg", st, 30, vl);
2375             if (strcmp(st, "disabled")) {
2376                set_state(PART:"elm.swallow.content.clip", "default", 0.0);
2377                emit("elm,action,unpress", "");
2378             if(get_int(click_cnt) == 0)
2379                set_int(click_cnt, 1);
2380             else if(get_int(click_cnt) == 1)
2381                set_int(click_cnt, 2);
2382             else if(get_int(click_cnt) == 2)
2383                set_int(click_cnt, 3);
2384             else
2385                set_int(click_cnt, 0);
2386             }
2387          }
2388       }
2389       program { name: "touch_snd";
2390          signal: "mouse,clicked,1";
2391          source: "event";
2392          script {
2393             new st[31];
2394             new Float:vl;
2395             if (get_int(multi_down) == 0) {
2396                get_state(PART:"effect_bg", st, 30, vl);
2397                if (strcmp(st, "disabled")) {
2398                   run_program(PROGRAM:"play_sample");
2399                   emit("elm,action,click", "");
2400                   set_int(mouse_click, 0);
2401                }
2402             }
2403          }
2404       }
2405       program {
2406          name: "play_sample";
2407          action: RUN_PLUGIN "touch_sound";
2408       }
2409       program { name: "disable";
2410          signal: "elm,state,disabled";
2411          source: "elm";
2412          action: STATE_SET "disabled" 0.0;
2413          target: "effect_bg";
2414          target: "elm.swallow.content.clip";
2415       }
2416       program { name: "enable";
2417          signal: "elm,state,enabled";
2418          source: "elm";
2419          action: STATE_SET "default" 0.0;
2420          target: "effect_bg";
2421          target: "elm.swallow.content.clip";
2422       }
2423       program { name: "multi_down";
2424          signal: "elm,action,multi,down";
2425          source: "elm";
2426          script {
2427             set_int(multi_down, 1);
2428          }
2429       }
2430       program { name: "multi_up";
2431          signal: "elm,action,multi,up";
2432          source: "elm";
2433          script {
2434             set_int(multi_down, 0);
2435          }
2436       }
2437       program { name: "start_persp";
2438          action: STATE_SET "start_persp" 0.0;
2439          transition: CUBIC_BEZIER 0.5 0.45 0.03 0.41 1.0;
2440          target: "effect_bg";
2441       }
2442       program { name: "change_opacity";
2443          action: STATE_SET "default" 0.0;
2444          transition: CUBIC_BEZIER 0.5 0.45 0.03 0.41 1.0;
2445          target: "effect_bg_clip";
2446       }
2447       program { name: "start_persp2";
2448          action: STATE_SET "start_persp" 0.0;
2449          transition: CUBIC_BEZIER 0.5 0.45 0.03 0.41 1.0;
2450          target: "effect_bg2";
2451       }
2452       program { name: "change_opacity2";
2453          action: STATE_SET "default" 0.0;
2454          transition: CUBIC_BEZIER 0.5 0.45 0.03 0.41 1.0;
2455          target: "effect_bg_clip2";
2456       }
2457       program { name: "start_persp3";
2458          action: STATE_SET "start_persp" 0.0;
2459          transition: CUBIC_BEZIER 0.5 0.45 0.03 0.41 1.0;
2460          target: "effect_bg3";
2461       }
2462       program { name: "change_opacity3";
2463          action: STATE_SET "default" 0.0;
2464          transition: CUBIC_BEZIER 0.5 0.45 0.03 0.41 1.0;
2465          target: "effect_bg_clip3";
2466       }
2467       program { name: "start_persp4";
2468          action: STATE_SET "start_persp" 0.0;
2469          transition: CUBIC_BEZIER 0.5 0.45 0.03 0.41 1.0;
2470          target: "effect_bg4";
2471       }
2472       program { name: "change_opacity4";
2473          action: STATE_SET "default" 0.0;
2474          transition: CUBIC_BEZIER 0.5 0.45 0.03 0.41 1.0;
2475          target: "effect_bg_clip4";
2476       }
2477    }
2478 }
2479
2480 group { name: "elm/button/base/datetime/ampm";
2481    script {
2482       public mouse_down = 0;
2483       public multi_down = 0;
2484    }
2485    parts {
2486       part { name: "base";
2487          type: SPACER;
2488          scale: 1;
2489          description { state: "default" 0.0;
2490             min: BUTTON_DATETIME_12HR_SIZE_INC;
2491             max: BUTTON_DATETIME_12HR_SIZE_INC;
2492          }
2493       }
2494       part { name: "top_padding";
2495          type: SPACER;
2496          scale: 1;
2497          description { state: "default" 0.0;
2498             fixed: 0 1;
2499             min: 0 BUTTON_DATETIME_12HR_TOP_PADDING_HEIGHT_INC;
2500             max: -1 BUTTON_DATETIME_12HR_TOP_PADDING_HEIGHT_INC;
2501             rel1 {
2502                to: "base";
2503                relative: 0.0 0.0;
2504             }
2505             rel2 {
2506                to: "base";
2507             }
2508             align: 0.0 0.0;
2509          }
2510       }
2511       part { name: "bottom_padding";
2512          type: SPACER;
2513          scale: 1;
2514          description { state: "default" 0.0;
2515             fixed: 0 1;
2516             min: 0 BUTTON_DATETIME_12HR_BOTTOM_PADDING_HEIGHT_INC;
2517             max: -1 BUTTON_DATETIME_12HR_BOTTOM_PADDING_HEIGHT_INC;
2518             rel1 {
2519                to: "base";
2520                relative: 0.0 1.0;
2521             }
2522             rel2 {
2523                to: "base";
2524                relative: 1.0 1.0;
2525             }
2526             align: 0.0 1.0;
2527          }
2528       }
2529       part { name: "text_bg";
2530          type: SPACER;
2531          scale: 1;
2532          description { state: "default" 0.0;
2533             rel1 {
2534                to: "top_padding";
2535                relative: 0.0 1.0;
2536             }
2537             rel2 {
2538                to: "bottom_padding";
2539                relative: 1.0 0.0;
2540             }
2541          }
2542       }
2543       part { name: "clipper";
2544          type: RECT;
2545          scale: 1;
2546          repeat_events: 1;
2547          description { state: "default" 0.0;
2548             rel1 {
2549                to: "text_bg";
2550             }
2551             rel2 {
2552                to: "text_bg";
2553             }
2554             color: 255 255 255 255;
2555          }
2556       }
2557       part { name: "elm.text";
2558          type: TEXT;
2559          clip_to: "clipper";
2560          mouse_events: 0;
2561          scale: 1;
2562          description { state: "default" 0.0;
2563             fixed: 1 1;
2564             rel1 {
2565                to: "text_bg";
2566             }
2567             rel2 {
2568                to: "text_bg";
2569             }
2570             text {
2571                /*(Changeable UI) text_class: "T271";*/
2572                font: "Tizen:style=Light"; size: "45";
2573                text_class: "tizen";
2574                min: 1 1;
2575             }/*(Changeable UI) color_class: "T271";*/
2576             color: 186 186 186 255;
2577             align: 0.5 0.5;
2578          }
2579          description { state: "pressed" 0.0;
2580             inherit: "default" 0.0;
2581             /*(Changeable UI) color_class: "T271P";*/
2582             color: 30 57 102 255;
2583          }
2584          description { state: "disabled" 0.0;
2585             inherit: "default" 0.0;
2586             /*(Changeable UI) color_class: "T271D";*/
2587             color: 51 51 51 255;
2588          }
2589       }
2590       part { name: "event";
2591          type: RECT;
2592          scale: 1;
2593          repeat_events: 0;
2594          description { state: "default" 0.0;
2595             fixed: 1 1;
2596             rel1.to: "text_bg";
2597             rel2.to: "text_bg";
2598             color: 0 0 0 0;
2599          }
2600       }
2601       part { name: "disabler";
2602          type: RECT;
2603          scale: 1;
2604          repeat_events: 0;
2605          mouse_events: 0;
2606          description { state: "default" 0.0;
2607             fixed: 1 1;
2608             rel1.to: "text_bg";
2609             rel2.to: "text_bg";
2610             color: 0 0 0 0;
2611             visible: 0;
2612          }
2613          description { state: "disabled" 0.0;
2614             inherit: "default" 0.0;
2615             visible: 1;
2616          }
2617       }
2618    }
2619    programs {
2620       program { name: "touch_snd";
2621          signal: "mouse,clicked,1";
2622          source: "event";
2623          script {
2624             new st[31];
2625             new Float:vl;
2626             if (get_int(multi_down) == 0) {
2627                get_state(PART:"elm.text", st, 30, vl);
2628                if (strcmp(st, "disabled")) {
2629                   run_program(PROGRAM:"play_sample");
2630                   emit("elm,action,click", "");
2631                }
2632             }
2633          }
2634       }
2635       program { name: "play_sample";
2636          action: RUN_PLUGIN "touch_sound";
2637       }
2638       program { name: "disable";
2639          signal: "elm,state,disabled";
2640          source: "elm";
2641          action: STATE_SET "disabled" 0.0;
2642          target: "elm.text";
2643          target: "disabler";
2644       }
2645       program { name: "enable";
2646          signal: "elm,state,enabled";
2647          source: "elm";
2648          action: STATE_SET "default" 0.0;
2649          target: "elm.text";
2650          target: "disabler";
2651       }
2652       program { name: "multi_down";
2653          signal: "elm,action,multi,down";
2654          source: "elm";
2655          script {
2656             set_int(multi_down, 1);
2657          }
2658       }
2659       program { name: "multi_up";
2660          signal: "elm,action,multi,up";
2661          source: "elm";
2662          script {
2663             set_int(multi_down, 0);
2664          }
2665       }
2666    }
2667 }
2668
2669 group { name: "elm/button/base/datetime/confirm";
2670   images {
2671      image: "timer_control_btn_bg.png" COMP;
2672   }
2673   script {
2674      public mouse_down = 0;
2675      public multi_down = 0;
2676   }
2677   parts {
2678      part { name: "bg";
2679         type: RECT;
2680         scale: 1;
2681         description { state: "default" 0.0;
2682            min: BUTTON_DATETIME_CONFIRM_SIZE_INC;
2683            max: BUTTON_DATETIME_CONFIRM_SIZE_INC;
2684            color: 0 0 0 0;
2685         }
2686      }
2687      part { name: "elm.content.bg";
2688         type: IMAGE;
2689         scale: 1;
2690         repeat_events: 1;
2691         description { state: "default" 0.0;
2692            image.normal: "timer_control_btn_bg.png";
2693            rel1.to: "bg";
2694            rel2.to: "bg";
2695            fixed: 1 1;
2696            min: BUTTON_DATETIME_CONFIRM_SIZE_INC;
2697            max: BUTTON_DATETIME_CONFIRM_SIZE_INC;
2698            color: 38 38 38 255;
2699         }
2700         description { state: "pressed" 0.0;
2701            inherit: "default" 0.0;
2702            color: 6 127 209 255;
2703         }
2704         description { state: "disabled" 0.0;
2705            inherit: "default" 0.0;
2706            color: 25 25 25 255;
2707         }
2708      }
2709      part { name: "elm.swallow.content";
2710         type: SWALLOW;
2711         scale: 1;
2712         description { state: "default" 0.0;
2713            visible: 1;
2714            align: 0.5 0.5;
2715            rel1 {
2716               relative: 0.0 0.0;
2717               to: "elm.content.bg";
2718            }
2719            rel2 {
2720               relative: 1.0 1.0;
2721               to: "elm.content.bg";
2722            }
2723            min: BUTTON_DATETIME_CONFIRM_ICON_SIZE_INC;
2724            max: BUTTON_DATETIME_CONFIRM_ICON_SIZE_INC;
2725            fixed: 1 1;
2726         }
2727      }
2728      part { name: "event";
2729         scale: 1;
2730         type: RECT;
2731         description { state: "default" 0.0;
2732            fixed: 1 1;
2733            rel1.to: "bg";
2734            rel2.to: "bg";
2735            color: 0 0 0 0;
2736         }
2737      }
2738   }
2739   programs {
2740      program { name: "pressed";
2741         signal: "mouse,down,1*";
2742         source: "event";
2743         script {
2744            if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0)) {
2745               set_int(mouse_down, 1);
2746               run_program(PROGRAM:"button_press1");
2747            }
2748         }
2749      }
2750      program { name: "button_press1";
2751         script {
2752            new st[31];
2753            new Float:vl;
2754            get_state(PART:"elm.content.bg", st, 30, vl);
2755            if (strcmp(st, "disabled")) {
2756               get_state(PART:"elm.content.bg", st, 30, vl);
2757               if(!strcmp(st, "default")) {
2758                  set_state(PART:"elm.content.bg", "pressed", 0.0);
2759               }
2760               emit("elm,action,press", "");
2761            }
2762         }
2763      }
2764      program { name: "unpressed";
2765         signal: "mouse,up,1";
2766         source: "event";
2767         script {
2768            if (get_int(mouse_down) == 1) {
2769               set_int(mouse_down, 0);
2770               run_program(PROGRAM:"button_unpress1");
2771            }
2772         }
2773      }
2774      program { name: "button_unpress1";
2775         script {
2776            new st[31];
2777            new Float:vl;
2778            get_state(PART:"elm.content.bg", st, 30, vl);
2779            if (strcmp(st, "disabled")) {
2780               get_state(PART:"elm.content.bg", st, 30, vl);
2781               if(!strcmp(st, "pressed")) {
2782                  set_state(PART:"elm.content.bg", "default", 0.0);
2783               }
2784               emit("elm,action,unpress", "");
2785            }
2786         }
2787      }
2788      program { name: "touch_snd";
2789         signal: "mouse,clicked,1";
2790         source: "event";
2791         script {
2792            new st[31];
2793            new Float:vl;
2794            if (get_int(multi_down) == 0) {
2795               get_state(PART:"bg", st, 30, vl);
2796               if (strcmp(st, "disabled")) {
2797                  run_program(PROGRAM:"play_sample");
2798                  emit("elm,action,click", "");
2799               }
2800            }
2801         }
2802      }
2803      program {
2804         name: "play_sample";
2805         action: RUN_PLUGIN "touch_sound";
2806      }
2807      program { name: "disable";
2808         signal: "elm,state,disabled";
2809         source: "elm";
2810         action: STATE_SET "disabled" 0.0;
2811         target: "elm.content.bg";
2812      }
2813      program { name: "enable";
2814         signal: "elm,state,enabled";
2815         source: "elm";
2816         action: STATE_SET "default" 0.0;
2817         target: "elm.content.bg";
2818      }
2819      program { name: "multi_down";
2820         signal: "elm,action,multi,down";
2821         source: "elm";
2822         script {
2823            set_int(multi_down, 1);
2824         }
2825      }
2826      program { name: "multi_up";
2827         signal: "elm,action,multi,up";
2828         source: "elm";
2829         script {
2830            set_int(multi_down, 0);
2831         }
2832      }
2833   }
2834 }
2835
2836 group { name: "elm/button/base/naviframe/title_icon";
2837    script {
2838       public mouse_down = 0;
2839       public multi_down = 0;
2840    }
2841    parts {
2842       part { name: "button_bg";
2843          type: RECT;
2844          scale: 1;
2845          description { state: "default" 0.0;
2846             min: ACTIONBAR_TITLE_BTN_SIZE;
2847             max: ACTIONBAR_TITLE_BTN_SIZE;
2848             visible: 0;
2849          }
2850          description { state: "pressed" 0.0;
2851             inherit: "default" 0.0;
2852             visible: 1;
2853             color: 34 73 124 255; /*(Changeable UI) color_class: "B0511P";*/
2854          }
2855          description { state: "disabled" 0.0;
2856             inherit: "default" 0.0;
2857          }
2858       }
2859       part { name: "elm.swallow.content";
2860          type: SWALLOW;
2861          scale: 1;
2862          clip_to: "elm.icon.clipper";
2863          description { state: "default" 0.0;
2864             visible: 0;
2865          }
2866          description { state: "visible" 0.0;
2867             inherit: "default" 0.0;
2868             visible: 1;
2869          }
2870       }
2871       part { name: "elm.icon.clipper";
2872          type: RECT;
2873          description { state: "default" 0.0;
2874             color: 239 255 63 255; /*(Changeable UI) color_class: "B052L1";*/
2875          }
2876          description { state: "clicked" 0.0;
2877             inherit: "default" 0.0;
2878          }
2879          description { state: "disabled" 0.0;
2880             color: 239 255 63 51; /*(Changeable UI) color_class: "B052L1D";*/
2881          }
2882       }
2883       part { name: "over2";
2884          type: RECT;
2885          ignore_flags: ON_HOLD;
2886          description { state: "default" 0.0;
2887             color: 0 0 0 0;
2888          }
2889       }
2890       part { name: "over3";
2891          type: RECT;
2892          repeat_events: 1;
2893          description { state: "default" 0.0;
2894             color: 0 0 0 0;
2895          }
2896       }
2897       part { name: "disabler";
2898          type: RECT;
2899          description { state: "default" 0.0;
2900             color: 0 0 0 0;
2901             visible: 0;
2902          }
2903          description { state: "disabled" 0.0;
2904             inherit: "default" 0.0;
2905             visible: 1;
2906          }
2907       }
2908    }
2909    programs {
2910       program { name: "button_click";
2911          signal: "mouse,down,1";
2912          source: "over2";
2913          script {
2914             if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0))
2915             {
2916                set_int(mouse_down, 1);
2917                run_program(PROGRAM:"button_click1");
2918             }
2919          }
2920       }
2921       program { name: "button_click1";
2922          action: SIGNAL_EMIT "elm,action,press" "";
2923          after: "button_click_anim";
2924       }
2925       program { name: "button_click_anim";
2926          script {
2927             set_state(PART:"elm.icon.clipper", "clicked", 0.0);
2928             set_state(PART:"button_bg", "pressed", 0.0);
2929          }
2930       }
2931       program { name: "button_double_click";
2932          signal: "mouse,down,1,double";
2933          source: "over2";
2934          script {
2935             if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0))
2936             {
2937                set_int(mouse_down, 1);
2938                run_program(PROGRAM:"button_click_anim");
2939             }
2940          }
2941       }
2942       program { name: "button_unpress";
2943          action: SIGNAL_EMIT "elm,action,unpress" "";
2944          after: "button_unclick_anim";
2945       }
2946       program { name: "button_unclick_anim";
2947          action: STATE_SET "default" 0.0;
2948          target: "button_bg";
2949       }
2950       program { name: "button_mouseout_clicked";
2951          signal: "mouse,up,1";
2952          source: "over3";
2953          script {
2954             if (get_int(mouse_down) == 1)
2955             {
2956                set_int(mouse_down, 0);
2957                set_state(PART:"elm.icon.clipper", "default", 0.0);
2958                run_program(PROGRAM:"button_unpress");
2959             }
2960          }
2961       }
2962       program { name: "touch_snd";
2963          signal: "mouse,clicked,1";
2964          source: "over2";
2965          script {
2966             if (get_int(multi_down) == 0) {
2967                run_program(PROGRAM:"play_sound");
2968                run_program(PROGRAM:"button_unclick3");
2969             }
2970          }
2971       }
2972       program { name: "play_sound";
2973          action: RUN_PLUGIN "touch_sound";
2974       }
2975       program { name: "button_unclick3";
2976          action: SIGNAL_EMIT "elm,action,click" "";
2977       }
2978       program { name: "icon_show";
2979          signal: "elm,state,icon,visible";
2980          source: "elm";
2981          action: STATE_SET "visible" 0.0;
2982          target: "elm.swallow.content";
2983       }
2984       program { name: "icon_hide";
2985          signal: "elm,state,icon,hidden";
2986          source: "elm";
2987          action: STATE_SET "default" 0.0;
2988          target: "elm.swallow.content";
2989       }
2990       program { name: "disable";
2991          signal: "elm,state,disabled";
2992          source: "elm";
2993          action: STATE_SET "disabled" 0.0;
2994          target: "disabler";
2995          target: "elm.icon.clipper";
2996          target: "button_bg";
2997       }
2998       program { name: "enable";
2999          signal: "elm,state,enabled";
3000          source: "elm";
3001          action: STATE_SET "default" 0.0;
3002          target: "disabler";
3003          target: "elm.icon.clipper";
3004          target: "button_bg";
3005       }
3006       program { name: "multi_down";
3007          signal: "elm,action,multi,down";
3008          source: "elm";
3009          script {
3010             set_int(multi_down, 1);
3011          }
3012       }
3013       program { name: "multi_up";
3014          signal: "elm,action,multi,up";
3015          source: "elm";
3016          script {
3017             set_int(multi_down, 0);
3018          }
3019       }
3020    }
3021 }
3022
3023 group { name: "elm/button/base/spinner/default";
3024    script {
3025       public mouse_down = 0;
3026       public multi_down = 0;
3027       public select_state = 0;
3028    }
3029    parts {
3030       part { name: "bg";
3031          type: SPACER;
3032          scale: 1;
3033          description { state: "default" 0.0;
3034          }
3035       }
3036       part { name: "elm.text.title";
3037          type: TEXT;
3038          mouse_events: 0;
3039          scale: 1;
3040          description { state: "default" 0.0;
3041             min: 0 RADIO_DATETIME_FIELD_TITLE_HEIGHT_INC;
3042             fixed: 0 1;
3043             rel1 {
3044                to: "bg";
3045             }
3046             rel2 {
3047                to: "bg";
3048                relative: 1.0 0.0;
3049             }
3050             text {
3051                font: "Tizen:style=Light"; size: "24"; /*(Changeable UI) text_class: "T273";*/
3052                text_class: "tizen";
3053                min: 1 1;
3054             }
3055             color: 102 102 102 255;
3056             align: 0.5 0.0;
3057          }
3058          description { state: "pressed" 0.0;
3059             inherit: "default" 0.0;
3060             color: 30 57 102 255;
3061          }
3062          description { state: "disabled" 0.0;
3063             inherit: "default" 0.0;
3064             color: 51 51 51 255;
3065          }
3066          description { state: "on" 0.0;
3067             inherit: "default" 0.0;
3068             color: 249 249 249 255;
3069          }
3070          description { state: "on_pressed" 0.0;
3071             inherit: "default" 0.0;
3072             color: 75 143 252 255;
3073          }
3074          description { state: "on_disabled" 0.0;
3075             inherit: "default" 0.0;
3076             color: 51 51 51 255;
3077          }
3078       }
3079       part { name: "elm.text";
3080          type: TEXT;
3081          mouse_events: 0;
3082          scale: 1;
3083          description { state: "default" 0.0;
3084             min: 0 RADIO_DATETIME_FIELD_HEIGHT_INC;
3085             fixed: 0 1;
3086             rel1 {
3087                to: "bg";
3088                relative: 0.0 1.0;
3089             }
3090             rel2 {
3091                to: "bg";
3092                relative: 1.0 1.0;
3093             }
3094             text {
3095                font: "Tizen:style=Light"; size: "45"; /*(Changeable UI) text_class: "T271";*/
3096                text_class: "tizen";
3097                min: 1 1;
3098                fit: 1 1;
3099                size_range: SPINNER_TEXT_SIZE_INC;
3100             }
3101             color: 102 102 102 255;
3102             align: 0.5 1.0;
3103          }
3104          description { state: "pressed" 0.0;
3105             inherit: "default" 0.0;
3106             color: 30 57 102 255;
3107          }
3108          description { state: "disabled" 0.0;
3109             inherit: "default" 0.0;
3110             color: 51 51 51 255;
3111          }
3112          description { state: "on" 0.0;
3113             inherit: "default" 0.0;
3114             color: 249 249 249 255;
3115          }
3116          description { state: "on_pressed" 0.0;
3117             inherit: "default" 0.0;
3118             color: 75 143 252 255;
3119          }
3120          description { state: "on_disabled" 0.0;
3121             inherit: "default" 0.0;
3122             color: 51 51 51 255;
3123          }
3124       }
3125       part { name: "event";
3126          scale: 1;
3127          type: RECT;
3128          description { state: "default" 0.0;
3129                color: 0 0 0 0;
3130          }
3131       }
3132       part { name: "disabler";
3133          type: RECT;
3134          scale: 1;
3135          repeat_events: 0;
3136          mouse_events: 0;
3137          description { state: "default" 0.0;
3138             fixed: 1 1;
3139             rel1.to: "bg";
3140             rel2.to: "bg";
3141             color: 0 0 0 0;
3142             visible: 0;
3143          }
3144          description { state: "disabled" 0.0;
3145             inherit: "default" 0.0;
3146             visible: 1;
3147          }
3148       }
3149    }
3150    programs {
3151       program { name: "pressed";
3152          signal: "mouse,down,1*";
3153          source: "event";
3154          script {
3155             if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0))
3156               {
3157                   set_int(mouse_down, 1);
3158                   run_program(PROGRAM:"button_press1");
3159               }
3160          }
3161       }
3162       program { name: "button_press1";
3163          script {
3164             new st[31];
3165             new Float:vl;
3166             get_state(PART:"bg", st, 30, vl);
3167             if (strcmp(st, "disabled")) {
3168                if (get_int(select_state) == 0) {
3169                   set_state(PART:"elm.text.title", "pressed", 0.0);
3170                   set_state(PART:"elm.text", "pressed", 0.0);
3171                }
3172                else {
3173                   set_state(PART:"elm.text.title", "on_pressed", 0.0);
3174                   set_state(PART:"elm.text", "on_pressed", 0.0);
3175                }
3176                emit("elm,action,press", "");
3177             }
3178          }
3179       }
3180       program { name: "unpressed";
3181          signal: "mouse,up,1";
3182          source: "event";
3183          script {
3184             if (get_int(mouse_down) == 1) {
3185                set_int(mouse_down, 0);
3186                run_program(PROGRAM:"button_unpress1");
3187             }
3188          }
3189       }
3190       program { name: "button_unpress1";
3191          script {
3192             new st[31];
3193             new Float:vl;
3194             get_state(PART:"bg", st, 30, vl);
3195             if (strcmp(st, "disabled")) {
3196                if (get_int(select_state) == 0) {
3197                   set_state(PART:"elm.text.title", "default", 0.0);
3198                   set_state(PART:"elm.text", "default", 0.0);
3199                }
3200                else {
3201                   set_state(PART:"elm.text.title", "on", 0.0);
3202                   set_state(PART:"elm.text", "on", 0.0);
3203                }
3204                emit("elm,action,unpress", "");
3205             }
3206          }
3207       }
3208       program { name: "touch_snd";
3209          signal: "mouse,clicked,1";
3210          source: "event";
3211          script {
3212             new st[31];
3213             new Float:vl;
3214             if (get_int(multi_down) == 0) {
3215                get_state(PART:"bg", st, 30, vl);
3216                if (strcmp(st, "disabled")) {
3217                   run_program(PROGRAM:"play_sample");
3218                   emit("elm,action,click", "");
3219                }
3220             }
3221          }
3222       }
3223       program {
3224          name: "play_sample";
3225          action: RUN_PLUGIN "touch_sound";
3226       }
3227       program { name: "disable";
3228          signal: "elm,state,disabled";
3229          source: "elm";
3230          action: STATE_SET "disabled" 0.0;
3231          target: "elm.text.title";
3232          target: "elm.text";
3233          target: "disabler";
3234       }
3235       program { name: "enable";
3236          signal: "elm,state,enabled";
3237          source: "elm";
3238          action: STATE_SET "default" 0.0;
3239          target: "elm.text.title";
3240          target: "elm.text";
3241          target: "disabler";
3242       }
3243       program { name: "multi_down";
3244          signal: "elm,action,multi,down";
3245          source: "elm";
3246          script {
3247             set_int(multi_down, 1);
3248          }
3249       }
3250       program { name: "multi_up";
3251          signal: "elm,action,multi,up";
3252          source: "elm";
3253          script {
3254             set_int(multi_down, 0);
3255          }
3256       }
3257       program { name: "select";
3258          signal: "elm,state,selected";
3259          source: "elm";
3260          script {
3261             set_int(select_state, 1);
3262             run_program(PROGRAM:"animate_on");
3263          }
3264       }
3265       program { name: "unselect";
3266          signal: "elm,state,unselected";
3267          source: "elm";
3268          script {
3269             set_int(select_state, 0);
3270             run_program(PROGRAM:"animate_off");
3271          }
3272       }
3273       program { name: "animate_on";
3274          action: STATE_SET "on" 0.0;
3275          transition: CUBIC_BEZIER 0.3 0.25 0.46 0.45 1.0;
3276          target: "elm.text.title";
3277          target: "elm.text";
3278       }
3279       program { name: "animate_off";
3280          action: STATE_SET "default" 0.0;
3281          transition: CUBIC_BEZIER 0.3 0.25 0.46 0.45 1.0;
3282          target: "elm.text.title";
3283          target: "elm.text";
3284       }
3285    }
3286 }
3287
3288 group { name: "elm/button/base/spinner/circle";
3289    script {
3290       public mouse_down = 0;
3291       public multi_down = 0;
3292       public select_state = 0;
3293       public rotary_state = 0;
3294    }
3295    parts {
3296       part { name: "bg";
3297          type: SPACER;
3298          scale: 1;
3299          description { state: "default" 0.0;
3300          }
3301          description { state: "disabled" 0.0;
3302             inherit: "default" 0.0;
3303          }
3304       }
3305       part { name: "elm.text";
3306          type: TEXT;
3307          mouse_events: 0;
3308          scale: 1;
3309          description { state: "default" 0.0;
3310             min: 0 RADIO_DATETIME_FIELD_HEIGHT_INC;
3311             fixed: 0 1;
3312             rel1 {
3313                to: "bg";
3314                relative: 0.0 1.0;
3315             }
3316             rel2 {
3317                to: "bg";
3318                relative: 1.0 1.0;
3319             }
3320             text {
3321                font: "SamsungSansNum-3T:style=Thin";
3322                size: "50";
3323                align: 0.5 0.5;
3324                min: 1 1;
3325             }
3326             color: 250 250 250 255;
3327             align: 0.5 1.0;
3328          }
3329          description { state: "pressed" 0.0;
3330             inherit: "default" 0.0;
3331             color: 76 143 252 255;
3332          }
3333          description { state: "disabled" 0.0;
3334             inherit: "default" 0.0;
3335             color: 51 51 51 255;
3336          }
3337          description { state: "on" 0.0;
3338             inherit: "default" 0.0;
3339             color: 250 250 250 255;
3340          }
3341          description { state: "on_blink_off" 0.0;
3342             inherit: "default" 0.0;
3343             color: 102 102 102 255;
3344          }
3345       }
3346       part { name: "event";
3347          scale: 1;
3348          type: RECT;
3349          description { state: "default" 0.0;
3350                color: 0 0 0 0;
3351          }
3352       }
3353       part { name: "disabler";
3354          type: RECT;
3355          scale: 1;
3356          repeat_events: 0;
3357          mouse_events: 0;
3358          description { state: "default" 0.0;
3359             fixed: 1 1;
3360             rel1.to: "bg";
3361             rel2.to: "bg";
3362             color: 0 0 0 0;
3363             visible: 0;
3364          }
3365          description { state: "disabled" 0.0;
3366             inherit: "default" 0.0;
3367             visible: 1;
3368          }
3369       }
3370    }
3371    programs {
3372       program { name: "pressed";
3373          signal: "mouse,down,1*";
3374          source: "event";
3375          script {
3376             if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0))
3377               {
3378                   set_int(mouse_down, 1);
3379                   run_program(PROGRAM:"button_press1");
3380               }
3381          }
3382       }
3383       program { name: "button_press1";
3384          script {
3385             new st[31];
3386             new Float:vl;
3387             get_state(PART:"bg", st, 30, vl);
3388             if (strcmp(st, "disabled")) {
3389                set_state(PART:"elm.text", "pressed", 0.0);
3390                //emit("elm,action,press", "");
3391             }
3392          }
3393       }
3394       program { name: "unpressed";
3395          signal: "mouse,up,1";
3396          source: "event";
3397          script {
3398             if (get_int(mouse_down) == 1) {
3399                set_int(mouse_down, 0);
3400                run_program(PROGRAM:"button_unpress1");
3401             }
3402          }
3403       }
3404       program { name: "button_unpress1";
3405          script {
3406             new st[31];
3407             new Float:vl;
3408             get_state(PART:"bg", st, 30, vl);
3409             if (strcmp(st, "disabled")) {
3410                if (get_int(select_state) == 0) {
3411                   set_state(PART:"elm.text", "default", 0.0);
3412                }
3413                else {
3414                   set_state(PART:"elm.text", "on", 0.0);
3415                   run_program(PROGRAM:"blink_off_show");
3416                }
3417                emit("elm,action,unpress", "");
3418             }
3419          }
3420       }
3421       program { name: "touch_snd";
3422          signal: "mouse,clicked,1";
3423          source: "event";
3424          script {
3425             new st[31];
3426             new Float:vl;
3427             if (get_int(multi_down) == 0) {
3428                get_state(PART:"bg", st, 30, vl);
3429                if (strcmp(st, "disabled")) {
3430                   run_program(PROGRAM:"play_sample");
3431                }
3432             }
3433          }
3434       }
3435       program {
3436          name: "play_sample";
3437          action: RUN_PLUGIN "touch_sound";
3438       }
3439       program { name: "disable";
3440          signal: "elm,state,disabled";
3441          source: "elm";
3442          action: STATE_SET "disabled" 0.0;
3443          target: "bg";
3444          target: "elm.text";
3445          target: "disabler";
3446       }
3447       program { name: "enable";
3448          signal: "elm,state,enabled";
3449          source: "elm";
3450          action: STATE_SET "default" 0.0;
3451          target: "bg";
3452          target: "elm.text";
3453          target: "disabler";
3454       }
3455       program { name: "multi_down";
3456          signal: "elm,action,multi,down";
3457          source: "elm";
3458          script {
3459             set_int(multi_down, 1);
3460          }
3461       }
3462       program { name: "multi_up";
3463          signal: "elm,action,multi,up";
3464          source: "elm";
3465          script {
3466             set_int(multi_down, 0);
3467          }
3468       }
3469       program { name: "select";
3470          signal: "elm,state,selected";
3471          source: "elm";
3472          script {
3473             new st[31];
3474             new Float:vl;
3475             get_state(PART:"bg", st, 30, vl);
3476             if (strcmp(st, "disabled")) {
3477                set_int(select_state, 1);
3478                set_int(rotary_state, 0);
3479                run_program(PROGRAM:"blink_off_show");
3480             }
3481          }
3482       }
3483       program { name: "unselect";
3484          signal: "elm,state,unselected";
3485          source: "elm";
3486          script {
3487             new st[31];
3488             new Float:vl;
3489             get_state(PART:"bg", st, 30, vl);
3490             if (strcmp(st, "disabled")) {
3491                set_int(select_state, 0);
3492                run_program(PROGRAM:"unselect_effect");
3493             }
3494          }
3495       }
3496       program { name: "rotary_activate";
3497          signal: "elm,state,rotary,active";
3498          source: "eext";
3499          script {
3500             new st[31];
3501             new Float:vl;
3502             get_state(PART:"bg", st, 30, vl);
3503             if (strcmp(st, "disabled")) {
3504                set_int(rotary_state, 1);
3505                run_program(PROGRAM:"select_effect");
3506             }
3507          }
3508       }
3509       program { name: "rotary_inactivate";
3510          signal: "elm,state,rotary,inactive";
3511          source: "eext";
3512          script {
3513             new st[31];
3514             new Float:vl;
3515             get_state(PART:"bg", st, 30, vl);
3516             if (strcmp(st, "disabled")) {
3517                set_int(rotary_state, 0);
3518                run_program(PROGRAM:"blink_off_show");
3519             }
3520          }
3521       }
3522       program { name: "select_effect";
3523          action: STATE_SET "on" 0.0;
3524          transition: CUBIC_BEZIER 0.15 0.25 0.46 0.45 1.0;
3525          target: "elm.text";
3526       }
3527       program { name: "unselect_effect";
3528          action: STATE_SET "default" 0.0;
3529          transition: CUBIC_BEZIER 0.15 0.25 0.46 0.45 1.0;
3530          target: "elm.text";
3531       }
3532       program { name: "blink_off_show";
3533          script {
3534             new st[31];
3535             new Float:vl;
3536             get_state(PART:"bg", st, 30, vl);
3537             if (strcmp(st, "disabled")) {
3538                if (get_int(select_state) == 1 && get_int(rotary_state) == 0)
3539                   run_program(PROGRAM:"blink_off_show_effect");
3540             }
3541          }
3542       }
3543       program { name: "blink_off_show_effect";
3544          action: STATE_SET "on_blink_off" 0.0;
3545          transition: CUBIC_BEZIER 0.3 0.25 0.46 0.45 1.0;
3546          target: "elm.text";
3547          after: "blink_off";
3548       }
3549       program { name: "blink_off";
3550          script {
3551             new st[31];
3552             new Float:vl;
3553             get_state(PART:"bg", st, 30, vl);
3554             if (strcmp(st, "disabled")) {
3555                if (get_int(select_state) == 1 && get_int(rotary_state) == 0)
3556                   run_program(PROGRAM:"blink_off_effect");
3557             }
3558          }
3559       }
3560       program { name: "blink_off_effect";
3561          action: STATE_SET "on_blink_off" 0.0;
3562          transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0;
3563          target: "elm.text";
3564          after: "blink_on_show";
3565       }
3566       program { name: "blink_on_show";
3567          script {
3568             new st[31];
3569             new Float:vl;
3570             get_state(PART:"bg", st, 30, vl);
3571             if (strcmp(st, "disabled")) {
3572                if (get_int(select_state) == 1 && get_int(rotary_state) == 0)
3573                   run_program(PROGRAM:"blink_on_show_effect");
3574             }
3575          }
3576       }
3577       program { name: "blink_on_show_effect";
3578          action: STATE_SET "on" 0.0;
3579          transition: CUBIC_BEZIER 0.3 0.25 0.46 0.45 1.0;
3580          target: "elm.text";
3581          after: "blink_on";
3582       }
3583       program { name: "blink_on";
3584          script {
3585             new st[31];
3586             new Float:vl;
3587             get_state(PART:"bg", st, 30, vl);
3588             if (strcmp(st, "disabled")) {
3589                if (get_int(select_state) == 1 && get_int(rotary_state) == 0)
3590                   run_program(PROGRAM:"blink_on_effect");
3591             }
3592          }
3593       }
3594       program { name: "blink_on_effect";
3595          action: STATE_SET "on" 0.0;
3596          transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0;
3597          target: "elm.text";
3598          after: "blink_off_show";
3599       }
3600    }
3601 }
3602
3603 group { name: "elm/button/base/rotary_selector_item";
3604    script {
3605       public mouse_down = 0;
3606       public multi_down = 0;
3607       public selected = 0;
3608    }
3609    parts {
3610       part { name: "base";
3611          type: SPACER;
3612          scale: 1;
3613          description { state: "default" 0.0;
3614             min: ROTARY_SELECTOR_ITEM_WIDTH_INC ROTARY_SELECTOR_ITEM_HEIGHT_INC;
3615             max: ROTARY_SELECTOR_ITEM_WIDTH_INC ROTARY_SELECTOR_ITEM_HEIGHT_INC;
3616          }
3617       }
3618       part { name: "item,bg_image";
3619          scale: 1;
3620          type: SWALLOW;
3621          clip_to: "elm.swallow.bg_image.clip";
3622          description { state: "default" 0.0;
3623             rel1.to: "base";
3624             rel2.to: "base";
3625             map.on: 1;
3626          }
3627          description { state: "pressed" 0.0;
3628             inherit: "default" 0.0;
3629          }
3630          description { state: "selected" 0.0;
3631             inherit: "default" 0.0;
3632             map {
3633                zoom.x: 1.2;
3634                zoom.y: 1.2;
3635             }
3636          }
3637          description { state: "disabled" 0.0;
3638             inherit: "default" 0.0;
3639          }
3640       }
3641       part { name: "elm.swallow.bg_image.clip";
3642          type: RECT;
3643          scale: 1;
3644          description { state: "default" 0.0;
3645             color: 250 250 250 255;
3646             rel1.relative : -0.2 -0.2;
3647             rel2.relative : 1.2 1.2;
3648          }
3649          description { state: "pressed" 0.0;
3650             inherit: "default" 0.0;
3651             color: 191 191 191 255;
3652          }
3653          description { state: "selected" 0.0;
3654             inherit: "default" 0.0;
3655             color: 250 250 250 255;
3656          }
3657          description { state: "disabled" 0.0;
3658             inherit: "default" 0.0;
3659             color: 77 77 77 255;
3660          }
3661       }
3662       part { name: "item,icon";
3663          type: SWALLOW;
3664          clip_to: "elm.swallow.icon.clip";
3665          scale: 1;
3666          description { state: "default" 0.0;
3667             rel1.to: "base";
3668             rel2.to: "base";
3669             map.on: 1;
3670          }
3671          description { state: "pressed" 0.0;
3672             inherit: "default" 0.0;
3673          }
3674          description { state: "selected" 0.0;
3675             inherit: "default" 0.0;
3676             map {
3677                zoom.x: 1.2;
3678                zoom.y: 1.2;
3679             }
3680          }
3681          description { state: "disabled" 0.0;
3682             inherit: "default" 0.0;
3683          }
3684       }
3685       part { name: "elm.swallow.icon.clip";
3686          type: RECT;
3687          scale: 1;
3688          description { state: "default" 0.0;
3689          color: 20 20 20 255;
3690          }
3691          description { state: "pressed" 0.0;
3692             inherit: "default" 0.0;
3693          color: 2 130 209 255;
3694          }
3695          description { state: "selected" 0.0;
3696             inherit: "default" 0.0;
3697          color: 2 130 209 255;
3698          }
3699          description { state: "disabled" 0.0;
3700             inherit: "default" 0.0;
3701          color: 51 51 51 255;
3702          }
3703       }
3704       part { name: "event";
3705          type: RECT;
3706          scale: 1;
3707          description { state: "default" 0.0;
3708             color: 0 0 0 0;
3709             rel1.to: "base";
3710             rel2.to: "base";
3711          }
3712       }
3713    }
3714    programs {
3715       program { name: "pressed";
3716          signal: "mouse,down,1*";
3717          source: "event";
3718          script {
3719             if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0))
3720             {
3721                set_int(mouse_down, 1);
3722                run_program(PROGRAM:"button_press1");
3723             }
3724          }
3725       }
3726       program { name: "button_press1";
3727          script {
3728             new st[31];
3729             new Float:vl;
3730             get_state(PART:"item,bg_image", st, 30, vl);
3731             if (strcmp(st, "disabled")) {
3732                set_state(PART:"elm.swallow.bg_image.clip", "pressed", 0.0);
3733                set_state(PART:"elm.swallow.icon.clip", "pressed", 0.0);
3734                emit("elm,action,press", "");
3735             }
3736          }
3737       }
3738       program { name: "unpressed";
3739          signal: "mouse,up,1";
3740          source: "event";
3741          script {
3742             if (get_int(mouse_down) == 1) {
3743                set_int(mouse_down, 0);
3744                run_program(PROGRAM:"button_unpress1");
3745             }
3746          }
3747       }
3748       program { name: "button_unpress1";
3749          script {
3750             new st[31];
3751             new Float:vl;
3752             get_state(PART:"item,bg_image", st, 30, vl);
3753             if (strcmp(st, "disabled")) {
3754                set_state(PART:"elm.swallow.bg_image.clip", "default", 0.0);
3755                set_state(PART:"elm.swallow.icon.clip", "default", 0.0);
3756                emit("elm,action,unpress", "");
3757             }
3758          }
3759       }
3760       program { name: "touch_snd";
3761          signal: "mouse,clicked,1";
3762          source: "event";
3763          script {
3764             new st[31];
3765             new Float:vl;
3766             if (get_int(multi_down) == 0) {
3767                get_state(PART:"item,bg_image", st, 30, vl);
3768                if (strcmp(st, "disabled")) {
3769                   if (get_int(selected) == 0)
3770                   {
3771                      set_int(selected, 1);
3772                      run_program(PROGRAM:"selected_ef");
3773                   }
3774                   else
3775                   {
3776                      set_int(selected, 0);
3777                   }
3778                   run_program(PROGRAM:"play_sample");
3779                   emit("elm,action,click", "");
3780                }
3781             }
3782          }
3783       }
3784       program { name: "selected_mode";
3785          signal: "elm,action,button,selected";
3786          source: "";
3787          script {
3788             if (get_int(selected) == 0)
3789             {
3790                set_int(selected, 1);
3791                run_program(PROGRAM:"selected_ef");
3792             }
3793          }
3794       }
3795       program { name: "unselected_mode";
3796          signal: "elm,action,button,unselected";
3797          source: "";
3798          script {
3799             if (get_int(selected) == 1)
3800             {
3801                set_int(selected, 0);
3802                run_program(PROGRAM:"unselected_ef");
3803             }
3804          }
3805       }
3806       program {
3807          name: "play_sample";
3808          action: RUN_PLUGIN "touch_sound";
3809       }
3810       program { name: "disable";
3811          signal: "elm,state,disabled";
3812          source: "elm";
3813          action: STATE_SET "disabled" 0.0;
3814          target: "item,bg_image";
3815          target: "elm.swallow.icon.clip";
3816       }
3817       program { name: "enable";
3818          signal: "elm,state,enabled";
3819          source: "elm";
3820          action: STATE_SET "default" 0.0;
3821          target: "item,bg_image";
3822          target: "elm.swallow.icon.clip";
3823       }
3824       program { name: "multi_down";
3825          signal: "elm,action,multi,down";
3826          source: "elm";
3827          script {
3828             set_int(multi_down, 1);
3829          }
3830       }
3831       program { name: "multi_up";
3832          signal: "elm,action,multi,up";
3833          source: "elm";
3834          script {
3835             set_int(multi_down, 0);
3836          }
3837       }
3838       program { name: "selected_ef";
3839          action: STATE_SET "selected" 0.0;
3840          target: "elm.swallow.bg_image.clip";
3841          target: "item,bg_image";
3842          target: "elm.swallow.icon.clip";
3843          target: "item,icon";
3844          transition: CUBIC_BEZIER 0.45 0.25 0.46 0.45 1.0;
3845       }
3846       program { name: "unselected_ef";
3847          action: STATE_SET "default" 0.0;
3848          transition: CUBIC_BEZIER 0.45 0.25 0.46 0.45 1.0;
3849          target: "elm.swallow.bg_image.clip";
3850          target: "item,bg_image";
3851          target: "elm.swallow.icon.clip";
3852          target: "item,icon";
3853       }
3854    }
3855 }
3856
3857 // FIXME: style for focus UI (and temporally, for ctxpopup)
3858 // This style should have focus image for "focus_image" part after the image is added
3859 #define BUTTON_DEFAULT_FOCUS_STYLES(style_name) \
3860    group { name: "elm/button/base/"style_name; \
3861       data { \
3862          item: "focus_highlight" "on"; \
3863       } \
3864       script { \
3865          public mouse_down = 0; \
3866          public multi_down = 0; \
3867       } \
3868       parts { \
3869          part { name: "elm.swallow.content"; \
3870             type: SWALLOW; \
3871             scale: 1; \
3872             description { state: "default" 0.0; \
3873             } \
3874          } \
3875          part { name: "focus_image"; \
3876             scale: 1; \
3877             type: RECT; \
3878             mouse_events: 0; \
3879             repeat_events: 1; \
3880             description { state: "default" 0.0; \
3881                visible: 0; \
3882                color: 0 0 0 0; /*(Changeable UI) color_class: "transparent";*/ \
3883             } \
3884             description { state: "focused" 0.0; \
3885                inherit: "default" 0.0; \
3886                visible: 1; \
3887             } \
3888          } \
3889          part { name: "over2"; \
3890             type: RECT; \
3891             repeat_events: 1; \
3892             ignore_flags: ON_HOLD; \
3893             description { state: "default" 0.0; \
3894                color: 0 0 0 0; \
3895             } \
3896          } \
3897          part { name: "over3"; \
3898             type: RECT; \
3899             repeat_events: 1; \
3900             description { state: "default" 0.0; \
3901                color: 0 0 0 0; \
3902             } \
3903          } \
3904       } \
3905       programs { \
3906          program { name: "button_press"; \
3907             signal: "mouse,down,1*"; \
3908             source: "over2"; \
3909             script { \
3910                if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0)) \
3911                  { \
3912                      set_int(mouse_down, 1); \
3913                      emit("elm,action,press", ""); \
3914                  } \
3915             } \
3916          } \
3917          program { name: "button_unpress"; \
3918             signal: "mouse,up,1*"; \
3919             source: "over3"; \
3920             script { \
3921                if (get_int(mouse_down) == 1) \
3922                  { \
3923                      set_int(mouse_down, 0); \
3924                      emit("elm,action,unpress", ""); \
3925                   } \
3926             } \
3927          } \
3928          program { name: "button_click"; \
3929             signal: "mouse,clicked,1"; \
3930             source: "over2"; \
3931             script { \
3932                if (get_int(multi_down) == 0) { \
3933                  emit("elm,action,click", ""); \
3934                } \
3935             } \
3936          } \
3937          program { name: "action_focus"; \
3938             signal: "elm,action,focus_highlight,show"; \
3939             source: "elm"; \
3940             action: STATE_SET "focused" 0.0; \
3941             target: "focus_image"; \
3942          } \
3943          program { name: "action_unfocus"; \
3944             signal: "elm,action,focus_highlight,hide"; \
3945             source: "elm"; \
3946             action: STATE_SET "default" 0.0; \
3947             target: "focus_image"; \
3948          } \
3949          program { \
3950             name: "multi_down"; \
3951             signal: "elm,action,multi,down"; \
3952             source: "elm"; \
3953             script { \
3954                set_int(multi_down, 1); \
3955             } \
3956          } \
3957          program { \
3958             name: "multi_up"; \
3959             signal: "elm,action,multi,up"; \
3960             source: "elm"; \
3961             script { \
3962                set_int(multi_down, 0); \
3963             } \
3964          } \
3965       } \
3966    } \
3967
3968 BUTTON_DEFAULT_FOCUS_STYLES("focus")