Tizen 2.0 Release
[profile/ivi/org.tizen.video-player.git] / res / edc / vp-progressbar-list.edc
1 #define PROGRESSBAR_TITLE_FONT_SIZE_INC 28
2 #define PROGRESSBAR_STATUS_TEXT_FONT_SIZE_INC 20
3
4 #define PROGRESSBAR_LIST_PROGRESS_STYLE_TEXT_COLOR_INC          0 0 0 255
5 #define PROGRESSBAR_LIST_PROGRESS_STYLE_STATUS_TEXT_COLOR_INC          224 224 224 255
6 #define PROGRESSBAR_LIST_PROCESS_WIDTH_INC 66
7 #define PROGRESSBAR_LIST_PROCESS_HEIGHT_INC 66
8 #define PROGRESSBAR_LIST_PROCESS_SMALL_INC 35
9 #define PROGRESSBAR_LIST_PROCESS_SMALL_IMAGE "32x32"
10 #define PROGRESSBAR_LIST_PROGRESS_HEIGHT_INC 8
11
12 #define GALLERY_EDC_IMAGE_LIST_PROGRESS_BG                                      "00_winset_list_progress_bg.png"
13 #define GALLERY_EDC_IMAGE_LIST_PROGRESS_BAR                                     "T01_video_list_progress_bar.png"
14
15    group { name: "elm/progressbar/horizontal/video/list_progress";
16       images {
17          image: GALLERY_EDC_IMAGE_LIST_PROGRESS_BG COMP;
18          image: GALLERY_EDC_IMAGE_LIST_PROGRESS_BAR COMP;
19       }
20       parts {
21          part { name: "elm.padding.left";
22             type: RECT;
23             scale: 1;
24             description {
25                state: "default" 0.0;
26                min: 0 0;
27                fixed: 1 0;
28                rel1 {
29                   relative: 0.0  0.0;
30                   offset: 0 0;
31                }
32                rel2 {
33                   relative: 0.0  1.0;
34                   offset: 0 0;
35                }
36                color: 0 0 0 0;
37                align: 0.0 0.0;
38             }
39          }
40          part { name: "elm.padding.right";
41             type: RECT;
42             scale: 1;
43             description {
44                state: "default" 0.0;
45                min: 0 0;
46                fixed: 1 0;
47                rel1 {
48                   relative: 1.0  0.0;
49                   offset: 0 0;
50                }
51                rel2 {
52                   relative: 1.0  1.0;
53                   offset:   0   0;
54                }
55                color: 0 0 0 0;
56                align: 1.0 0.0;
57             }
58          }
59          part { name: "elm.background.progressbar";
60             type: RECT;
61             mouse_events: 0;
62             scale: 1;
63             description {
64                state: "default" 0.0;
65                rel1 {
66                   to_x: "elm.padding.left";
67                   relative: 1.0 0.0;
68                   offset: 0 0;
69                }
70                rel2 {
71                   to_x: "elm.padding.right";
72                   relative: 0.0 1.0;
73                   offset: 0 0;
74                }
75             }
76          }
77          part { name: "elm.swallow.bar";
78             mouse_events: 0;
79             scale: 1;
80             type: SWALLOW;
81             description {
82                min: 1 PROGRESSBAR_LIST_PROGRESS_HEIGHT_INC;
83                max: 99999 PROGRESSBAR_LIST_PROGRESS_HEIGHT_INC;
84                state: "default" 0.0;
85                rel1 {
86                   to: "elm.background.progressbar";
87                   relative: 0.0 0.0;
88                }
89                rel2 {
90                   to: "elm.background.progressbar";
91                   relative: 1.0 1.0;
92                }
93             }
94          }
95          part { name: "elm.swallow.content";
96             type: SWALLOW;
97             scale: 1;
98             description { state: "default" 0.0;
99                visible: 0;
100                align: 0.0 0.5;
101                rel1 {
102                   offset: 0 0;
103                   to_y: "elm.background.progressbar";
104                }
105                rel2 {
106                   offset: 0 -1;
107                   relative: 0.0 1.0;
108                   to_y: "elm.background.progressbar";
109                }
110             }
111             description { state: "visible" 0.0;
112                inherit: "default" 0.0;
113                visible: 1;
114                aspect: 1.0 1.0;
115                aspect_preference: VERTICAL;
116                rel2.offset: 4 -1;
117             }
118          }
119          part { name: "elm.text";
120             type: TEXT;
121             mouse_events: 0;
122             scale: 1;
123             description { state: "default" 0.0;
124                visible: 0;
125                fixed: 1 1;
126                align: 0.0 0.5;
127                rel1.to_x: "elm.swallow.content";
128                rel1.relative: 1.0 0.0;
129                rel2.to_x: "elm.swallow.content";
130                rel2.relative: 1.0 1.0;
131                color: PROGRESSBAR_LIST_PROGRESS_STYLE_TEXT_COLOR_INC;
132                text {
133                   font: "SLP:style=Medium";
134                   text_class: "slp";
135                   size: PROGRESSBAR_STATUS_TEXT_FONT_SIZE_INC;
136                   min: 0 0;
137                   align: 0.0 0.5;
138                }
139             }
140             description { state: "visible" 0.0;
141                inherit: "default" 0.0;
142                visible: 0;
143                text.min: 1 1;
144             }
145          }
146          part { name: "background";
147             mouse_events: 0;
148             scale: 1;
149             clip_to: "elm.background.progressbar";
150             description {
151                state: "default" 0.0;
152                rel1 {
153                   to: "elm.swallow.bar";
154                   relative: 0.0 0.0;
155                }
156                rel2 {
157                   to: "elm.swallow.bar";
158                   relative: 1.0 1.0;
159                }
160                image {
161                   normal: GALLERY_EDC_IMAGE_LIST_PROGRESS_BG;
162                   border: 0 0 1 1;
163                }
164             }
165          }
166          part { name: "elm.text.status";
167             type: TEXT;
168             mouse_events: 0;
169             scale: 1;
170             description { state: "default" 0.0;
171                fixed: 1 1;
172                visible: 0;
173                rel1 {
174                   to: "background";
175                   relative: 0.5 0.5;
176                }
177                rel2 {
178                   to: "background";
179                   relative: 0.5 0.5;
180                }
181                text {
182                   font: "SLP:style=Medium";
183                   text_class: "slp";
184                   size: PROGRESSBAR_STATUS_TEXT_FONT_SIZE_INC;
185                   min: 0 0;
186                   align: 0.5 0.0;
187                }
188                color: PROGRESSBAR_LIST_PROGRESS_STYLE_TEXT_COLOR_INC;
189             }
190             description { state: "show" 0.0;
191                inherit: "default" 0.0;
192                visible: 0;
193                text.min: 1 1;
194             }
195          }
196          part { name: "elm.progress.progressbar";
197             mouse_events: 0;
198             scale: 1;
199             clip_to: "elm.background.progressbar";
200             description {
201                state: "default" 0.0;
202                min: 0 0;
203                fixed: 1 1;
204                rel1 {
205                   to: "elm.swallow.bar";
206                   relative: 0.0 0.0;
207                }
208                rel2 {
209                   to_y: "elm.swallow.bar";
210                   to_x: "elm.cur.progressbar";
211                   offset: -1 -1;
212                }
213                image {
214                   normal: GALLERY_EDC_IMAGE_LIST_PROGRESS_BAR;
215                   border: 0 0 1 1;
216                }
217             }
218             description {
219                state: "invert" 0.0;
220                inherit: "default" 0.0;
221                rel1 {
222                   to_y: "elm.swallow.bar";
223                   to_x: "elm.cur.progressbar";
224                }
225                rel2 {
226                   to: "elm.swallow.bar";
227                   relative: 1.0 1.0;
228                }
229             }
230             description {
231                state: "state_begin" 0.0;
232                inherit: "default" 0.0;
233                rel1 {
234                   to: "elm.swallow.bar";
235                   relative: 0.0 0.0;
236                }
237                rel2 {
238                   to: "elm.swallow.bar";
239                   relative: 0.1 1.0;
240                }
241             }
242             description {
243                state: "state_end" 0.0;
244                inherit: "default" 0.0;
245                rel1 {
246                   to: "elm.swallow.bar";
247                   relative: 0.9 0.0;
248                }
249                rel2 {
250                   to: "elm.swallow.bar";
251                   relative: 1.0 1.0;
252                }
253             }
254          }
255          part { name: "text-bar";
256             type: TEXT;
257             mouse_events: 0;
258             scale: 1;
259             clip_to: "progress-rect";
260             //effect: SOFT_SHADOW;
261             scale: 0;
262             description { state: "default" 0.0;
263                align: 0.0 0.0;
264                fixed: 1 1;
265                visible: 0;
266                rel1.to: "elm.text.status";
267                rel1.offset: -1 -1;
268                rel2.to: "elm.text.status";
269                text {
270                   text_source: "elm.text.status";
271                   font: "SLP:style=Medium";
272                   text_class: "slp";
273                   size: PROGRESSBAR_STATUS_TEXT_FONT_SIZE_INC;
274                   min: 0 0;
275                   align: 0.0 0.0;
276                }
277                color: PROGRESSBAR_LIST_PROGRESS_STYLE_STATUS_TEXT_COLOR_INC;
278             }
279             description { state: "show" 0.0;
280                inherit: "default" 0.0;
281                visible: 0;
282                text.min: 1 1;
283             }
284          }
285          part { name: "elm.cur.progressbar";
286             mouse_events: 0;
287             scale: 1;
288             dragable {
289                confine: "background";
290                x: 1 1 1;
291                y: 0 0 0;
292             }
293             description { state: "default" 0.0;
294                min: 0 28;
295                fixed: 1 1;
296                visible: 0;
297                rel1 {
298                   to: "background";
299                   relative: 0 0;
300                }
301                rel2.to: "background";
302            }
303          }
304          part { name: "progress-rect";
305             type: RECT;
306             mouse_events: 0;
307             scale: 1;
308             description {
309                state: "default" 0.0;
310                rel1.to: "elm.progress.progressbar";
311                rel2.to: "elm.progress.progressbar";
312             }
313          }
314       }
315       programs {
316          program { name: "label_show";
317             signal: "elm,state,text,visible";
318             source: "elm";
319             action:  STATE_SET "visible" 0.0;
320             target: "elm.text";
321          }
322          program { name: "label_hide";
323             signal: "elm,state,text,hidden";
324             source: "elm";
325             action:  STATE_SET "default" 0.0;
326             target: "elm.text";
327          }
328          program { name: "icon_show";
329             signal: "elm,state,icon,visible";
330             source: "elm";
331             action:  STATE_SET "visible" 0.0;
332             target: "elm.swallow.content";
333          }
334          program { name: "icon_hide";
335             signal: "elm,state,icon,hidden";
336             source: "elm";
337             action:  STATE_SET "default" 0.0;
338             target: "elm.swallow.content";
339          }
340          program { name: "units_show";
341             signal: "elm,state,units,visible";
342             source: "elm";
343             action:  STATE_SET "show" 0.0;
344             target: "text-bar";
345             target: "elm.text.status";
346          }
347          program { name: "units_hide";
348             signal: "elm,state,units,hidden";
349             source: "elm";
350             action:  STATE_SET "default" 0.0;
351             target: "text-bar";
352             target: "elm.text.status";
353          }
354          program { name: "slide_to_end";
355             action:  STATE_SET "state_end" 0.0;
356             transition: LINEAR 0.5;
357             target: "elm.progress.progressbar";
358             after: "slide_to_begin";
359          }
360          program { name: "slide_to_begin";
361             signal: "elm,state,slide,begin";
362             action: STATE_SET "state_begin" 0.0;
363             target: "elm.progress.progressbar";
364             transition: LINEAR 0.5;
365             after: "slide_to_end";
366          }
367          program { name: "start_pulse";
368             signal: "elm,state,pulse,start";
369             source: "elm";
370            // after: "slide_to_end";
371          }
372          program { name: "stop_pulse";
373             signal: "elm,state,pulse,stop";
374             source: "elm";
375             action: ACTION_STOP;
376             target: "slide_to_begin";
377             target: "slide_to_end";
378             target: "start_pulse";
379             //after: "state_pulse";
380          }
381          program { name: "state_pulse";
382             signal: "elm,state,pulse";
383             source: "elm";
384             action: STATE_SET "state_begin" 0.0;
385             target: "elm.progress.progressbar";
386             after: "units_hide";
387          }
388          program { name: "state_fraction";
389             signal: "elm,state,fraction";
390             source: "elm";
391             action: ACTION_STOP;
392             target: "slide_to_begin";
393             target: "slide_to_end";
394             target: "start_pulse";
395             action: STATE_SET "default" 0.0;
396             target: "elm.progress.progressbar";
397          }
398          program { name: "set_invert_on";
399             signal: "elm,state,inverted,on";
400             source: "elm";
401             action:  STATE_SET "invert" 0.0;
402             target: "elm.progress.progressbar";
403          }
404          program { name: "set_invert_off";
405             signal: "elm,state,inverted,off";
406             source: "elm";
407             action:  STATE_SET "default" 0.0;
408             target: "elm.progress.progressbar";
409          }
410       }
411    }
412
413
414 /*
415 #define PROGRESS_BG_DESC( param_num ) \
416    description { state: "pulse" 0.#param_num; \
417       inherit: "default" 0.0; \
418       image { \
419          normal: GALLERY_EDC_IMAGE_LIST_PROCESS_##param_num; \
420       } \
421    }
422
423 #define   PROGRESSING_DELAY    0.03
424
425    group { name: "elm/progressbar/horizontal/gallery/list_process";
426       images {
427          image: GALLERY_EDC_IMAGE_LIST_PROCESS_01 COMP;
428          image: GALLERY_EDC_IMAGE_LIST_PROCESS_02 COMP;
429          image: GALLERY_EDC_IMAGE_LIST_PROCESS_03 COMP;
430          image: GALLERY_EDC_IMAGE_LIST_PROCESS_04 COMP;
431          image: GALLERY_EDC_IMAGE_LIST_PROCESS_05 COMP;
432          image: GALLERY_EDC_IMAGE_LIST_PROCESS_06 COMP;
433          image: GALLERY_EDC_IMAGE_LIST_PROCESS_07 COMP;
434          image: GALLERY_EDC_IMAGE_LIST_PROCESS_08 COMP;
435          image: GALLERY_EDC_IMAGE_LIST_PROCESS_09 COMP;
436          image: GALLERY_EDC_IMAGE_LIST_PROCESS_10 COMP;
437          image: GALLERY_EDC_IMAGE_LIST_PROCESS_11 COMP;
438          image: GALLERY_EDC_IMAGE_LIST_PROCESS_12 COMP;
439          image: GALLERY_EDC_IMAGE_LIST_PROCESS_13 COMP;
440          image: GALLERY_EDC_IMAGE_LIST_PROCESS_14 COMP;
441          image: GALLERY_EDC_IMAGE_LIST_PROCESS_15 COMP;
442          image: GALLERY_EDC_IMAGE_LIST_PROCESS_16 COMP;
443          image: GALLERY_EDC_IMAGE_LIST_PROCESS_17 COMP;
444          image: GALLERY_EDC_IMAGE_LIST_PROCESS_18 COMP;
445          image: GALLERY_EDC_IMAGE_LIST_PROCESS_19 COMP;
446          image: GALLERY_EDC_IMAGE_LIST_PROCESS_20 COMP;
447          image: GALLERY_EDC_IMAGE_LIST_PROCESS_21 COMP;
448          image: GALLERY_EDC_IMAGE_LIST_PROCESS_22 COMP;
449          image: GALLERY_EDC_IMAGE_LIST_PROCESS_23 COMP;
450          image: GALLERY_EDC_IMAGE_LIST_PROCESS_24 COMP;
451          image: GALLERY_EDC_IMAGE_LIST_PROCESS_25 COMP;
452          image: GALLERY_EDC_IMAGE_LIST_PROCESS_26 COMP;
453          image: GALLERY_EDC_IMAGE_LIST_PROCESS_27 COMP;
454          image: GALLERY_EDC_IMAGE_LIST_PROCESS_28 COMP;
455          image: GALLERY_EDC_IMAGE_LIST_PROCESS_29 COMP;
456          image: GALLERY_EDC_IMAGE_LIST_PROCESS_30 COMP;
457       }
458       parts {
459          part { name: "elm.background.progressbar";
460             mouse_events: 0;
461             scale: 1;
462             type: RECT;
463             description {
464                state: "default" 0.0;
465             }
466          }
467          part { name: "elm.swallow.bar";
468             mouse_events: 0;
469             scale: 1;
470             type: SWALLOW;
471             description { state: "default" 0.0;
472                min: 0 0;
473                max: 0 0;
474                visible: 0;
475             }
476          }
477          part { name: "elm.swallow.content";
478             type: SWALLOW;
479             scale: 1;
480             description { state: "default" 0.0;
481                min: 0 0;
482                max: 0 0;
483                visible: 0;
484             }
485          }
486          part { name: "background";
487             mouse_events: 0;
488             scale: 1;
489             clip_to: "elm.background.progressbar";
490             description {
491                state: "default" 0.0;
492                min: PROGRESSBAR_LIST_PROCESS_WIDTH_INC PROGRESSBAR_LIST_PROCESS_HEIGHT_INC;
493                max: PROGRESSBAR_LIST_PROCESS_WIDTH_INC PROGRESSBAR_LIST_PROCESS_HEIGHT_INC;
494                visible: 1;
495                aspect: 1.0 1.0;
496                aspect_preference: BOTH;
497                image {
498                   normal: GALLERY_EDC_IMAGE_LIST_PROCESS_01;
499                }
500             }
501             description { state: "pulse" 0.0;
502                inherit: "default" 0.0;
503                image {
504                   normal: GALLERY_EDC_IMAGE_LIST_PROCESS_01;
505                }
506             }
507             PROGRESS_BG_DESC( 01 )
508             PROGRESS_BG_DESC( 02 )
509             PROGRESS_BG_DESC( 03 )
510             PROGRESS_BG_DESC( 04 )
511             PROGRESS_BG_DESC( 05 )
512             PROGRESS_BG_DESC( 06 )
513             PROGRESS_BG_DESC( 07 )
514             PROGRESS_BG_DESC( 08 )
515             PROGRESS_BG_DESC( 09 )
516             PROGRESS_BG_DESC( 10 )
517             PROGRESS_BG_DESC( 11 )
518             PROGRESS_BG_DESC( 12 )
519             PROGRESS_BG_DESC( 13 )
520             PROGRESS_BG_DESC( 14 )
521             PROGRESS_BG_DESC( 15 )
522             PROGRESS_BG_DESC( 16 )
523             PROGRESS_BG_DESC( 17 )
524             PROGRESS_BG_DESC( 18 )
525             PROGRESS_BG_DESC( 19 )
526             PROGRESS_BG_DESC( 20 )
527             PROGRESS_BG_DESC( 21 )
528             PROGRESS_BG_DESC( 22 )
529             PROGRESS_BG_DESC( 23 )
530             PROGRESS_BG_DESC( 24 )
531             PROGRESS_BG_DESC( 25 )
532             PROGRESS_BG_DESC( 26 )
533             PROGRESS_BG_DESC( 27 )
534             PROGRESS_BG_DESC( 28 )
535             PROGRESS_BG_DESC( 29 )
536             PROGRESS_BG_DESC( 30 )
537          }
538       }
539       script {
540          public pulse_state;
541       }
542       programs {
543          program { name: "continue_pulse";
544             script {
545                new Float:state;
546                state = get_float(pulse_state);
547                set_state(PART:"background", "pulse", state);
548                state += 0.01;
549                if( state > 0.30 )
550                   state = 0.01;
551                set_float(pulse_state, state);
552             }
553                after: "delay";
554          }
555          program { name: "delay";
556             action: STATE_SET "pulse" 0.10;
557             target: "background";
558             in: PROGRESSING_DELAY 0.0;
559             after: "continue_pulse";
560          }
561          program { name: "start_pulse";
562             signal: "elm,state,pulse,start";
563             source: "elm";
564             script {
565                set_float(pulse_state, 0.0);
566             }
567             after: "continue_pulse";
568          }
569          program { name: "stop_pulse";
570             signal: "elm,state,pulse,stop";
571             source: "elm";
572             action: ACTION_STOP;
573             target: "continue_pulse";
574             target: "delay";
575             target: "start_pulse";
576             after: "init_pulse";
577          }
578          program { name: "init_pulse";
579             action: STATE_SET "default" 0.0;
580             target: "background";
581          }
582       }
583    }
584 */