Update changed code to RSA
[apps/native/volume-app.git] / data / volume_app.edc
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.tizenopensource.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 collections {
17
18         #define SLIDER_INDICATOR_TEXT_COLOR_INC      42 109 140 255
19         #define SLIDER_UNITS_TEXT_COLOR_INC          100 100 100 255
20         #define SLIDER_UNITS_TEXT_SIZE_INC  30
21         #define SLIDER_INDICATOR_TEXT_SIZE_INC  40
22         #define SLIDER_BASE_HEIGHT_INC  16
23         #define SLIDER_BASE_MIN_WIDTH_INC 375
24         #define SLIDER_BASE_HEIGHT_INC  16
25         #define SLIDER_SWALLOW_BAR_MIN_WIDTH_INC  58
26         #define SLIDER_SWALLOW_BAR_HEIGHT_INC  58
27         #define SLIDER_INDICATOR_MAX_WIDTH_INC 90
28         #define SLIDER_INDICATOR_WIDTH_INC 58
29         #define SLIDER_INDICATOR_HEIGHT_INC 58
30         #define SLIDER_DISABLER_PART_COLOR_INC   185 185 185 100
31
32         group { name: "elm/slider/horizontal/indicator/default";
33                         alias: "elm/slider/horizontal/indicator/disabled";
34                         alias: "elm/slider/vertical/indicator/default";
35                         alias: "elm/slider/vertical/indicator/disabled";
36                         alias: "elm/slider/horizontal/indicator/tap_to_drag";
37                 images {
38                         image: "00_slider_handle.png" COMP;
39                         image: "00_slider_handle_dim.png" COMP;
40                 }
41
42                 parts {
43                         part { name: "button_events";
44                                 type: RECT;
45                                 mouse_events: 1;
46                                 scale: 1;
47                                 description { state: "default" 0.0;
48                                         fixed: 1 1;
49                                         min: 2*SLIDER_INDICATOR_WIDTH_INC 1.5*SLIDER_INDICATOR_HEIGHT_INC;
50                                         aspect: 1.0 1.0;
51                                         aspect_preference: VERTICAL;
52                                         color: 0 0 0 0;
53                                 }
54                                 description { state: "disabled" 0.0;
55                                         inherit: "default" 0.0;
56                                         visible: 0;
57                                 }
58                         }
59
60                         part { name: "button0";
61                                 mouse_events: 0;
62                                 scale: 1;
63                                 description { state: "default" 0.0;
64                                         fixed: 1 1;
65                                         min: SLIDER_INDICATOR_WIDTH_INC SLIDER_INDICATOR_HEIGHT_INC;
66                                         max: SLIDER_INDICATOR_MAX_WIDTH_INC SLIDER_INDICATOR_HEIGHT_INC;
67                                         rel1 {
68                                                 to: "elm.indicator";
69                                                 offset: -2 -2;
70                                         }
71                                         rel2 {
72                                                 to: "elm.indicator";
73                                                 offset: 2 2;
74                                         }
75                                         image {
76                                                 normal: "00_slider_handle.png";
77                                                 border: 3 3 3 3;
78                                                 border_scale: 1;
79                                         }
80                                 }
81                                 description { state: "disabled" 0.0;
82                                         inherit: "default" 0.0;
83                                         image {
84                                                 normal: "00_slider_handle_dim.png";
85                                         }
86                                 }
87                         } /* "button0" end */
88
89                         part { name: "elm.indicator";
90                                 type: TEXT;
91                                 mouse_events: 0;
92                                 scale: 1;
93                                 description { state: "default" 0.0;
94                                         visible: 1;
95                                         color: SLIDER_INDICATOR_TEXT_COLOR_INC;
96                                         text {
97                                                 font: "SLP:style=Medium";
98                                                 size: SLIDER_INDICATOR_TEXT_SIZE_INC;
99                                                 min: 1 1;
100                                                 align: 0.5 0.5;
101                                                 text_class: "slp_medium";
102                                         }
103                                 }
104                                 description { state: "hide" 0.0;
105                                         inherit: "default" 0.0;
106                                         visible: 0;
107                                 }
108                         } /* "elm.indicator" end */
109                 } /* parts of "elm/slider/horizontal/indicator/default" end */
110
111                 programs {
112                         program { name: "set_val_show";
113                                 signal: "elm,state,val,show";
114                                 source: "elm";
115                                 action:  STATE_SET "default" 0.0;
116                                 target: "elm.indicator";
117                         }
118                         program { name: "set_val_hide";
119                                 signal: "elm,state,val,hide";
120                                 source: "elm";
121                                 action:  STATE_SET "hide" 0.0;
122                                 target: "elm.indicator";
123                         }
124                         program { name: "slider_disable";
125                                 signal: "elm,state,disabled";
126                                 source: "elm";
127                                 action:  STATE_SET "disabled" 0.0;
128                                 target: "button0";
129                                 target: "button_events";
130                         }
131                         program { name: "slider_enable";
132                                 signal: "elm,state,enabled";
133                                 source: "elm";
134                                 action:  STATE_SET "default" 0.0;
135                                 target: "button0";
136                                 target: "button_events";
137                         }
138                 }
139         }
140         /* END group "elm/slider/horizontal/indicator/default" */
141
142         group { name: "elm/slider/horizontal/volumeHorizontalSlider";
143                 images {
144                         image: "00_winset_list_progress_bg.png" COMP;
145                         image: "00_winset_list_progress_bar.png" COMP;
146                         image: "00_winset_divider_line.png" COMP;
147                 }
148
149                 script {
150                         public invert_on = 0;
151                         public set_invert_on() {
152                                 set_state(PART:"level", "inverted", 0.0);
153                                 set_state(PART:"level2", "inverted", 0.0);
154                                 set_int(invert_on, 1);
155                         }
156                         public set_invert_off() {
157                                 set_state(PART:"level", "default", 0.0);
158                                 set_state(PART:"level2", "default", 0.0);
159                                 set_int(invert_on, 0);
160                         }
161                         public thumb_down() {
162                                 if(get_int(invert_on) == 0)
163                                 set_state(PART:"level", "pressed", 0.0);
164                                 else if(get_int(invert_on) == 1)
165                                 set_state(PART:"level2", "pressed", 0.0);
166                         }
167                         public thumb_up() {
168                                 if(get_int(invert_on) == 0)
169                                 set_state(PART:"level", "default", 0.0);
170                                 else if(get_int(invert_on) == 1)
171                                 set_state(PART:"level2", "inverted", 0.0);
172                         }
173                 }
174
175                 parts {
176                         part { name: "base";
177                                 mouse_events: 0;
178                                 scale: 1;
179                                 description { state: "default" 0.0;
180                                         min: 402 16;
181                                         max: 99999 16;
182                                         rel1.to: "bg";
183                                         rel2.to: "bg";
184                                         image.normal: "00_winset_list_progress_bg.png";
185                                         image.border: 0 0 4 4;
186                                         image.border_scale: 1;
187                                 }
188                         } /* "base" end */
189
190                         part { name: "level";
191                                 mouse_events: 0;
192                                 scale: 1;
193                                 clip_to: "clipper";
194                                 description { state: "default" 0.0;
195                                         fixed: 1 1;
196                                         rel1.to: "base";
197                                         rel2 {
198                                                 to_y: "base";
199                                                 to_x: "elm.dragable.slider";
200                                                 relative: 0.5 1.0;
201                                         }
202                                         image.normal: "00_winset_list_progress_bar.png";
203                                         image.border: 0 0 4 4;
204                                         image.border_scale: 1;
205                                 }
206                                 description { state: "inverted" 0.0;
207                                         inherit: "default" 0.0;
208                                         visible: 0;
209                                 }
210                                 description { state: "pressed" 0.0;
211                                         inherit: "default" 0.0;
212                                         image.normal: "00_winset_list_progress_bar.png";
213                                 }
214                         } /* "level" end */
215
216                         part { name: "level2";
217                                 mouse_events: 0;
218                                 scale: 1;
219                                 clip_to: "clipper";
220                                 description { state: "default" 0.0;
221                                         fixed: 1 1;
222                                         visible: 0;
223                                         rel1 {
224                                                 to_y: "base";
225                                                 to_x: "elm.dragable.slider";
226                                                 relative: 0.5 0.0;
227                                         }
228                                         rel2.to: "base";
229                                         image.normal: "00_winset_list_progress_bar.png";
230                                         image.border: 0 0 4 4;
231                                         image.border_scale: 1;
232                                 }
233                                 description { state: "inverted" 0.0;
234                                         inherit: "default" 0.0;
235                                         visible: 1;
236                                 }
237                                 description { state: "pressed" 0.0;
238                                         inherit: "default" 0.0;
239                                         visible: 1;
240                                         image.normal: "00_winset_list_progress_bar.png";
241                                 }
242                         } /* "level" end */
243
244                         part { name: "bg";
245                                 type: RECT;
246                                 mouse_events: 0;
247                                 scale: 1;
248                                 description { state: "default" 0.0;
249                                         visible: 0;
250                                         rel1.to: "elm.swallow.bar";
251                                         rel2.to: "elm.swallow.bar";
252                                 }
253                         } /* "bg" end */
254
255                         part { name: "elm.swallow.bar";
256                                 type: SWALLOW;
257                                 mouse_events: 0;
258                                 scale: 1;
259                                 description { state: "default" 0.0;
260                                         min: 58 58;
261                                         max: 402 58;
262                                         align: 1.0 0.5;
263                                         rel1 {
264                                                 to_x: "bar_left_padding";
265                                                 relative: 1.0 0.0;
266                                         }
267                                         rel2 {
268                                                 to_x: "bar_right_padding";
269                                                 relative: 0.0 1.0;
270                                         }
271                                 }
272                         } /* "elm.swallow.bar" end */
273
274                         part { name: "bar_left_padding";
275                                 type: RECT;
276                                 scale: 1;
277                                 description {
278                                         state: "default" 0.0;
279                                         visible: 1;
280                                         min: 28 0;
281                                         fixed: 1 1;
282                                         color : 255 0 0 255;
283                                         rel1 {
284                                                 relative: 1.0  0.5;
285                                                 to_x: "elm.text";
286                                         }
287                                         rel2 {
288                                                 relative: 1.0  0.5;
289                                                 to_x: "elm.text";
290                                         }
291                                         align: 0.0 0.5;
292                                 }
293                         } /* "bar_left_padding" end */
294
295                         part {
296                                 name: "bar_right_padding";
297                                 type: RECT;
298                                 scale: 1;
299                                 description {
300                                         state: "default" 0.0;
301                                         visible: 1;
302                                         min: 28 0;
303                                         fixed: 1 1;
304                                         color : 0 255 0 255;
305                                         rel1 {
306                                                 relative: 0.0  0.5;
307                                                 to_x: "divider";
308                                         }
309                                         rel2 {
310                                                 relative: 0.0  0.5;
311                                                 to_x: "divider";
312                                         }
313                                         align: 1.0 0.5;
314                                 }
315                         } /* "bar_right_padding" end */
316
317                         part { name: "divider";
318                                 mouse_events: 0;
319                                 scale: 1;
320                                 description { state: "default" 0.0;
321                                         fixed: 1 1;
322                                         min: 2 64;
323                                         max: 2 64;
324                                         align: 1.0 0.5;
325                                         rel1 {
326                                                 relative: 0.0  0.5;
327                                                 to_x: "bar_right_right_padding";
328                                         }
329                                         rel2 {
330                                                 relative: 0.0  0.5;
331                                                 to_x: "bar_right_right_padding";
332                                         }
333                                         image {
334                                                 normal: "00_winset_divider_line.png";
335                                                 border: 0 0 18 0;
336                                                 border_scale: 1;
337                                         }
338                                 }
339                         } /* "divider" end */
340
341                         part {
342                                 name: "bar_right_right_padding";
343                                 type: SWALLOW;
344                                 scale: 1;
345                                 description {
346                                         state: "default" 0.0;
347                                         visible: 0;
348                                         min: 28 0;
349                                         fixed: 1 1;
350                                         rel1 {
351                                                 relative: 0.0  0.5;
352                                                 to_x: "elm.swallow.end";
353                                         }
354                                         rel2 {
355                                                 relative: 0.0  0.5;
356                                                 to_x: "elm.swallow.end";
357                                         }
358                                         align: 1.0 0.5;
359                                 }
360                         } /* "bar_right_right_padding" end */
361
362                         part { name: "elm.swallow.icon";
363                                 type: SWALLOW;
364                                 scale: 1;
365                                 description { state: "default" 0.0;
366                                         visible: 0;
367                                         align: 0.0 0.5;
368                                         rel1 {
369                                                 to_y: "elm.swallow.bar";
370                                         }
371                                         rel2 {
372                                                 relative: 0.0 1.0;
373                                                 to_y: "elm.swallow.bar";
374                                         }
375                                 }
376                                 description { state: "visible" 0.0;
377                                         inherit: "default" 0.0;
378                                         visible: 1;
379                                         aspect: 1.0 1.0;
380                                         aspect_preference: VERTICAL;
381                                 }
382                         } /* "elm.swallow.icon" end */
383
384                         part { name: "elm.text";
385                                 type: TEXT;
386                                 mouse_events: 0;
387                                 scale: 1;
388                                 description { state: "default" 0.0;
389                                         visible: 0;
390                                         fixed: 1 1;
391                                         align: 0.0 0.5;
392                                         rel1.to_x: "elm.swallow.icon";
393                                         rel1.relative: 1.0 0.0;
394                                         rel2.to_x: "elm.swallow.icon";
395                                         color: SLIDER_UNITS_TEXT_COLOR_INC;
396                                         text {
397                                                 font: "SLP:style=Medium";
398                                                 size: SLIDER_UNITS_TEXT_SIZE_INC;
399                                                 min: 0 0;
400                                                 align: 0.0 0.5;
401                                                 text_class: "slp_medium";
402                                         }
403                                 }
404                                 description { state: "visible" 0.0;
405                                         inherit: "default" 0.0;
406                                         visible: 1;
407                                         text.min: 1 1;
408                                 }
409                         } /* "elm.text" end */
410
411                         part { name: "elm.swallow.end";
412                                 type: SWALLOW;
413                                 scale: 1;
414                                 description { state: "default" 0.0;
415                                         visible: 0;
416                                         align: 1.0 0.5;
417                                         rel1 {
418                                                 relative: 1.0 0.0;
419                                                 to_y: "elm.swallow.bar";
420                                         }
421                                         rel2 {
422                                                 relative: 1.0 1.0;
423                                                 to_y: "elm.swallow.bar";
424                                         }
425                                 }
426                                 description { state: "visible" 0.0;
427                                         inherit: "default" 0.0;
428                                         visible: 1;
429                                         aspect: 1.0 1.0;
430                                         aspect_preference: VERTICAL;
431                                 }
432                         } /* "elm.swallow.end" end */
433
434                         part { name: "elm.dragable.slider";
435                                 type: GROUP;
436                                 source: "elm/slider/horizontal/indicator/default";
437                                 mouse_events: 1;
438                                 scale: 1;
439                                 dragable {
440                                         x: 1 1 0;
441                                         y: 0 0 0;
442                                         confine: "bg";
443                                 }
444                                 description { state: "default" 0.0;
445                                         min: SLIDER_INDICATOR_WIDTH_INC SLIDER_INDICATOR_HEIGHT_INC;
446                                         fixed: 1 1;
447                                         align: 0.5 0.5;
448                                         color: 0 0 0 0;
449                                 }
450                         } /* "elm.dragable.slider" end */
451
452                         part { name: "disabler";
453                                 type: RECT;
454                                 mouse_events: 1;
455                                 repeat_events: 0;
456                                 scale: 1;
457                                 description { state: "default" 0.0;
458                                         visible: 0;
459                                         color: 0 0 0 0;
460                                 }
461                                 description { state: "disabled" 0.0;
462                                         inherit: "default" 0.0;
463                                         visible: 1;
464                                 }
465                         } /* "disabler" end */
466
467                         part { name: "clipper";
468                                 type: RECT;
469                                 description { state: "default" 0.0;
470                                         color: 255 255 255 255;
471                                 }
472                                 description { state: "disabled" 0.0;
473                                         color: 255 255 255 102;
474                                         }
475                                 }
476                         } /* "clipper" end */
477
478                 programs {
479                         program { name: "text_show";
480                                 signal: "elm,state,text,visible";
481                                 source: "elm";
482                                 action:  STATE_SET "visible" 0.0;
483                                 target: "elm.text";
484                         }
485                         program { name: "text_hide";
486                                 signal: "elm,state,text,hidden";
487                                 source: "elm";
488                                 action:  STATE_SET "default" 0.0;
489                                 target: "elm.text";
490                         }
491                         program { name: "icon_show";
492                                 signal: "elm,state,icon,visible";
493                                 source: "elm";
494                                 action:  STATE_SET "visible" 0.0;
495                                 target: "elm.swallow.icon";
496                         }
497                         program { name: "icon_hide";
498                                 signal: "elm,state,icon,hidden";
499                                 source: "elm";
500                                 action:  STATE_SET "default" 0.0;
501                                 target: "elm.swallow.icon";
502                         }
503                         program { name: "end_show";
504                                 signal: "elm,state,end,visible";
505                                 source: "elm";
506                                 action:  STATE_SET "visible" 0.0;
507                                 target: "elm.swallow.end";
508                         }
509                         program { name: "end_hide";
510                                 signal: "elm,state,end,hidden";
511                                 source: "elm";
512                                 action:  STATE_SET "default" 0.0;
513                                 target: "elm.swallow.end";
514                         }
515                         program { name: "invert_on";
516                                 signal: "elm,state,inverted,on";
517                                 source: "elm";
518                                 script {
519                                         set_invert_on();
520                                 }
521                         }
522                         program { name: "invert_off";
523                                 signal: "elm,state,inverted,off";
524                                 source: "elm";
525                                 script {
526                                         set_invert_off();
527                                 }
528                         }
529                         program { name: "val_show";
530                                 signal: "mouse,down,*";
531                                 source: "elm.dragable.slider";
532                                 script {
533                                         thumb_down();
534                                 }
535                         }
536                         program { name: "val_hide";
537                                 signal: "mouse,up,*";
538                                 source: "elm.dragable.slider";
539                                 script {
540                                         thumb_up();
541                                 }
542                         }
543                         program { name: "slider_disable";
544                                 signal: "elm,state,disabled";
545                                 source: "elm";
546                                 action:  STATE_SET "disabled" 0.0;
547                                 target: "disabler";
548                                 target: "clipper";
549                         }
550                         program { name: "slider_enable";
551                                 signal: "elm,state,enabled";
552                                 source: "elm";
553                                 action:  STATE_SET "default" 0.0;
554                                 target: "disabler";
555                                 target: "clipper";
556                         }
557                 }
558         }
559         /* END group "elm/slider/horizontal/volumeHorizontalSlider" */
560
561         group { name : "block_events";
562                 parts{
563                         part { name : "blockevent";
564                                 type : RECT;
565                                 description {
566                                         color : 0 0 0 0;
567                                 }
568                         }
569                 }
570                 programs{
571                         program{
572                                 name : "clicked";
573                                 source : "blockevent";
574                                 signal : "mouse,clicked,1";
575                                 action : SIGNAL_EMIT "clicked" "*";
576                         }
577                 }
578         }
579         /* END group "block_events" */
580
581         group { name : "volumeLayout";
582                 images {
583                 image: "00_popup_bg.png" COMP;
584                 }
585                 parts{
586                         part { name : "base";
587                                 type : IMAGE;
588                                 scale : 1;
589                                 description { state: "default" 0.0;
590                                         image {
591                                                 normal: "00_popup_bg.png";
592                                                 border: 15 15 15 15;
593                                                 border_scale: 1;
594                                         }
595                                         min: 700 146;
596                                         max: 700 1120;
597                                         align: 0.5 0.5;
598                                 }
599                         }
600                         part { name: "elm.swallow.content";
601                                 type: SWALLOW;
602                                 scale : 1;
603                                 description { state: "default" 0.0;
604                                         min: 700 0;
605                                         fixed: 1 0;
606                                         rel1 {
607                                                 relative: 0.5 0.0;
608                                                 to: "base";
609                                         }
610                                         rel2 {
611                                                 relative: 0.5 1.0;
612                                                 to: "base";
613                                         }
614                                 }
615                         }
616                 }
617         }
618         /* END group "volumeLayout" */
619
620         group { name : "volumeLayoutContent";
621                 parts{
622                         part { name : "pad_t";
623                                 type : RECT;
624                                 scale : 1;
625                                 mouse_events : 0;
626                                 description { state: "default" 0.0;
627                                         align: 0.5 0.0;
628                                         min: 0 31;
629                                         fixed: 0 1;
630                                         visible: 0;
631                                         rel1 {
632                                                 relative: 1.0 0.0;
633                                                 to_x: "pad_l";
634                                         }
635                                         rel2 {
636                                                 relative: 0.0 0.0;
637                                                 to_x: "pad_r";
638                                         }
639                                 }
640                         } /* "pad_t" end */
641
642                         part { name : "pad_l";
643                                 type: RECT;
644                                 scale: 1;
645                                 description { state: "default" 0.0;
646                                         min : 32 0;
647                                         fixed: 1 0;
648                                         rel2.relative: 0.0 1.0;
649                                         visible: 0;
650                                         align: 0.0 0.0;
651                                 }
652                         } /* "pad_l" end */
653
654                         part { name: "pad_r";
655                                 type: RECT;
656                                 scale: 1;
657                                 description { state: "default" 0.0;
658                                         min : 32 0;
659                                         fixed: 1 0;
660                                         rel1.relative: 1.0 0.0;
661                                         visible: 0;
662                                         align: 1.0 0.0;
663                                 }
664                         } /* "pad_r" end */
665
666                         part{ name:"elm.swallow.content";
667                                 type: SWALLOW;
668                                 scale : 1;
669                                 description { state: "default" 0.0;
670                                         min: 616 0;
671                                         fixed: 1 0;
672                                         rel1 {
673                                                 relative: 0.5 1.0;
674                                                 to: "pad_t";
675                                         }
676                                         rel2 {
677                                                 relative: 0.5 0.0;
678                                                 to: "pad_b";
679                                         }
680                                 }
681                         } /* "elm.swallow.content" end */
682
683                         part { name: "pad_b";
684                                 type: RECT;
685                                 scale : 1;
686                                 mouse_events: 0;
687                                 description { state: "default" 0.0;
688                                         align: 0.5 1.0;
689                                         min: 0 31;
690                                         fixed: 0 1;
691                                         visible: 0;
692                                         rel1 {
693                                                 relative: 0.0 1.0;
694                                                 to_x: "pad_l";
695                                         }
696                                         rel2.to_x: "pad_r";
697                                 }
698                         }
699                 }
700         }
701         /* END group "volumeLayoutContent" */
702
703 }