apply FSL license
[apps/core/preloaded/video-player.git] / res / edc / hidden_button_panel.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
17
18 #include "image_res.edc"
19 #include "vp_font.edc"
20 /* program macro */
21
22 #define CONTROL_BUTTON_PROG(_item_name_)                                        \
23 program {                                                                                                       \
24         name: _item_name_".pressed";                                                            \
25         source: _item_name_;                                                                            \
26         signal: "mouse,down,1";                                                                         \
27         action: STATE_SET "pressed" 0.0;                                                        \
28         target: _item_name_;                                                                            \
29         after: "send."_item_name_".down.signal";                                                \
30 }                                                                                                                       \
31 program {                                                                                                       \
32         name: _item_name_".clicked";                                                            \
33         source: _item_name_;                                                                            \
34         signal: "mouse,up,1";                                                                           \
35         action: STATE_SET "default" 0.0;                                                                \
36         target: _item_name_;                                                                            \
37         after: "send."_item_name_".up.signal";                                          \
38 }                                                                                                                       \
39 program {                                                                                                       \
40         name: "send."_item_name_".down.signal";                                                 \
41         action: SIGNAL_EMIT "signal."_item_name_".down" _item_name_;    \
42 }                                                                                                                       \
43 program {                                                                                                       \
44         name: "send."_item_name_".up.signal";                                           \
45         action: SIGNAL_EMIT "signal."_item_name_".up" _item_name_;      \
46 } /* CONTROL_BUTTON_PROG */
47
48 collections {
49         group {
50                 name: "hidden_panel";
51
52                 script {
53                         public val_quality_select = 1;  /* 0: normal, 1: high */
54                         public set_quality_check() {
55                                 if(get_int(val_quality_select ) == 0) {
56                                         run_program(PROGRAM:"set.streaming.quality.normal");
57                                 }
58                                 if(get_int(val_quality_select ) == 1) {
59                                         run_program(PROGRAM:"set.streaming.quality.high");
60                                 }
61                                 if(get_int(val_quality_select ) == 2) {
62                                         run_program(PROGRAM:"set.streaming.quality.hide");
63                                 }
64                         }
65                 } /* scrpit */
66
67                 parts {
68                         part {
69                                 name: "hidden.button.panel.soundpath";
70                                 type: IMAGE;
71                                 mouse_events: 1;
72                                 scale: 1;
73                                 description {
74                                         state: "default" 0.0;
75                                         visible: 1;
76                                         min: 72 72;
77                                         fixed: 1 1;
78                                         align: 0.0 0.5;
79                                         rel1 { relative: 0.0 0.0;}
80                                         rel2 { relative: 0.0 0.0;}
81                                         color: 255 255 255 255;
82                                         image { normal: "T01_icon_soundPath.png"; }
83                                 }
84                                 description {
85                                         state: "pressed" 0.0;
86                                         inherit: "default" 0.0;
87                                         image { normal: "T01_icon_soundPath_press.png"; }
88                                 }
89                                 description {
90                                         state: "hide" 0.0;
91                                         inherit: "default" 0.0;
92                                         visible: 0;
93                                 }
94                         }
95
96                         part {
97                                 name: "control.streaming.hq.button.bg";
98                                 type: IMAGE;
99                                 mouse_events: 1;
100                                 scale: 1;
101                                 description {
102                                         state: "default" 0.0;
103                                         visible: 1;
104                                         min: 72 72;
105                                         fixed: 1 1;
106                                         align: 1.0 0.5;
107                                         rel1 { relative: 1.0 0.0; }
108                                         rel2 { relative: 1.0 0.0; }
109                                         image { normal: "T01_controller_btn_press.png"; border: 4 4 0 0;}
110                                         color: 255 255 255 255;
111                                 }
112                                 description {
113                                         state: "normal" 0.0;
114                                         visible: 1;
115                                         min: 72 72;
116                                         fixed: 1 1;
117                                         align: 1.0 0.5;
118                                         rel1 { relative: 1.0 0.0; }
119                                         rel2 { relative: 1.0 0.0; }
120                                         image { normal: "T01_controller_btn.png"; border: 4 4 0 0;}
121                                         color: 255 255 255 255;
122                                 }
123                                 description {
124                                         state: "hide" 0.0;
125                                         inherit: "default" 0.0;
126                                         visible: 0;
127                                 }
128                         }
129
130
131                         part {
132                                 name: "control.streaming.hq.txt";
133                                 type: TEXT;
134                                 scale: 1;
135                                 mouse_events: 1;
136                                 scale: 1;
137                                 description {
138                                         state: "default" 0.0;
139                                         color: 255 255 255 255;
140                                         visible: 1;
141                                         min: 72 72;
142                                         fixed: 1 1;
143                                         align: 1.0 0.5;
144                                         rel1 { relative: 1.0 0.0; }
145                                         rel2 { relative: 1.0 0.0; }
146                                         text {
147                                                 font: FONT_NANE;
148                                                 size: 26;
149                                                 text:  "HQ";
150                                                 align: 0.5 0.5;
151                                         }
152                                 }
153                                 description {
154                                         state: "normal" 0.0;
155                                         inherit: "default" 0.0;
156                                         visible: 1;
157                                 }
158                                 description {
159                                         state: "hide" 0.0;
160                                         inherit: "default" 0.0;
161                                         visible: 0;
162                                 }
163                         }
164
165                         part {
166                                 name: "control.streaming.hq.button";
167                                 type: RECT;
168                                 mouse_events: 1;
169                                 scale: 1;
170                                 description {
171                                         state: "default" 0.0;
172                                         visible: 1;
173                                         min: 48 48;
174                                         fixed: 1 1;
175                                         align: 1.0 0.5;
176                                         rel1 { relative: 1.0 0.0;}
177                                         rel2 { relative: 1.0 0.0;}
178                                         color: 255 255 255 0;
179                                 }
180                                 description {
181                                         state: "normal" 0.0;
182                                         inherit: "default" 0.0;
183                                         visible: 1;
184                                 }
185                                 description {
186                                         state: "hide" 0.0;
187                                         inherit: "default" 0.0;
188                                         visible: 0;
189                                 }
190                         }
191                 } /* parts */
192
193                 programs {
194                         program {
195                                 name: "hidden.button.panel.soundpath.pressed";
196                                 source: "hidden.button.panel.soundpath";
197                                 signal: "mouse,down,1";
198                                 action: STATE_SET "pressed" 0.0;
199                                 target: "hidden.button.panel.soundpath";
200                                 after: "send.hidden.button.panel.soundpath.down.signal";
201                         }
202
203                         program {
204                                 name: "send.hidden.button.panel.soundpath.down.signal";
205                                 action: SIGNAL_EMIT "signal.hidden.button.panel.soundpath.down" "hidden.button.panel.soundpath";
206                         }
207
208                         program {
209                                 name: "hidden.button.panel.soundpath.clicked";
210                                 source: "hidden.button.panel.soundpath";
211                                 signal: "mouse,up,1";
212                                 action: STATE_SET "default" 0.0;
213                                 target: "hidden.button.panel.soundpath";
214                                 after: "send.hidden.button.panel.soundpath.up.signal";
215                         }
216
217                         program {
218                                 name: "send.hidden.button.panel.soundpath.up.signal";
219                                 action: SIGNAL_EMIT "signal.hidden.button.panel.soundpath.up" "hidden.button.panel.soundpath";
220                         }
221
222                         program {
223                                 signal: "signal.hidden.button.panel.soundpath.show";
224                                 source: "*";
225                                 action: STATE_SET "default" 0.0;
226                                 target: "hidden.button.panel.soundpath";
227                         }
228
229                         program {
230                                 signal: "signal.hidden.button.panel.soundpath.hide";
231                                 source: "*";
232                                 action: STATE_SET "hide" 0.0;
233                                 target: "hidden.button.panel.soundpath";
234                         }
235
236                         program {
237                                 signal: "signal.control.streaming.quality.high";
238                                 source: "*";
239                                 script {
240                                         set_int(val_quality_select, 1);
241                                         set_quality_check();
242                                 }
243                         }
244
245                         program {
246                                 signal: "signal.control.streaming.quality.normal";
247                                 source: "*";
248                                 script {
249                                         set_int(val_quality_select, 0);
250                                         set_quality_check();
251                                 }
252                         }
253
254                         program {
255                                 signal: "signal.control.streaming.quality.hide";
256                                 source: "*";
257                                 script {
258                                         set_int(val_quality_select, 2);
259                                         set_quality_check();
260                                 }
261                         }
262
263                         program {
264                                 name: "set.streaming.quality.high";
265                                 action: STATE_SET "default" 0.0;
266                                 target: "control.streaming.hq.button.bg";
267                                 target: "control.streaming.hq.txt";
268                                 target: "control.streaming.hq.button";
269                         }
270
271                         program {
272                                 name: "set.streaming.quality.normal";
273                                 action: STATE_SET "normal" 0.0;
274                                 target: "control.streaming.hq.button.bg";
275                                 target: "control.streaming.hq.txt";
276                                 target: "control.streaming.hq.button";
277                         }
278
279                         program {
280                                 name: "set.streaming.quality.hide";
281                                 action: STATE_SET "hide" 0.0;
282                                 target: "control.streaming.hq.button.bg";
283                                 target: "control.streaming.hq.txt";
284                                 target: "control.streaming.hq.button";
285                         }
286
287                         CONTROL_BUTTON_PROG("control.streaming.hq.button");
288                 } /* programs */
289         } /* group */
290 } /* collections */