summaryrefslogtreecommitdiff
path: root/src/tests/emotion
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-10 03:43:32 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-10 03:43:32 +0000
commitdfb84c1657bfb14a5236b881193b81f4c0b8a69b (patch)
treeb51b210fc88a21eec8e5907b8bbfe12ebc669f90 /src/tests/emotion
parent532284dbbe4259a9f2291f44d3eff376849e8031 (diff)
efl: merge emotion.
this one was quite a huge work, but hopefully it's correct. NOTES: * removed vlc generic module, it should go into a separate package. * gstreamer is enabled by default (see --disable-gstreamer) * xine is disabled by default (see --enable-gstreamer) * generic is always built statically if supported * gstreamer and xine can't be configured as static (just lacks command line options, build system supports it) * v4l2 is enabled by default on linux if eeze is built (see --disable-v4l2) * emotion_test moved to src/tests/emotion and depends on EFL_ENABLE_TESTS (--with-tests), but is still installed if enabled. TODO (need your help!): * fix warnings with gstreamer and xine engine * call engine shutdown functions if building as static * remove direct usage of PACKAGE_*_DIR and use eina_prefix * add eina_prefix checkme file as evas and others * add support for $EFL_RUN_IN_TREE * create separate package for emotion_generic_modules * check docs hierarchy (doxygen is segv'in here) SVN revision: 82501
Diffstat (limited to 'src/tests/emotion')
-rw-r--r--src/tests/emotion/data/bpause.pngbin0 -> 383 bytes
-rw-r--r--src/tests/emotion/data/bplay.pngbin0 -> 425 bytes
-rw-r--r--src/tests/emotion/data/bstop.pngbin0 -> 401 bytes
-rw-r--r--src/tests/emotion/data/e_logo.pngbin0 -> 7833 bytes
-rw-r--r--src/tests/emotion/data/fr1.pngbin0 -> 591 bytes
-rw-r--r--src/tests/emotion/data/fr2.pngbin0 -> 288 bytes
-rw-r--r--src/tests/emotion/data/fr3.pngbin0 -> 657 bytes
-rw-r--r--src/tests/emotion/data/fr4.pngbin0 -> 375 bytes
-rw-r--r--src/tests/emotion/data/fr5.pngbin0 -> 1366 bytes
-rw-r--r--src/tests/emotion/data/fr6.pngbin0 -> 699 bytes
-rw-r--r--src/tests/emotion/data/fr7.pngbin0 -> 1184 bytes
-rw-r--r--src/tests/emotion/data/h_slider.pngbin0 -> 917 bytes
-rw-r--r--src/tests/emotion/data/icon.edc14
-rw-r--r--src/tests/emotion/data/knob.pngbin0 -> 1076 bytes
-rw-r--r--src/tests/emotion/data/orb.pngbin0 -> 203 bytes
-rw-r--r--src/tests/emotion/data/pnl.pngbin0 -> 705 bytes
-rw-r--r--src/tests/emotion/data/sl.pngbin0 -> 225 bytes
-rw-r--r--src/tests/emotion/data/theme.edc1667
-rw-r--r--src/tests/emotion/data/tiles.pngbin0 -> 3026 bytes
-rw-r--r--src/tests/emotion/data/video_frame_bottom.pngbin0 -> 514 bytes
-rw-r--r--src/tests/emotion/data/video_frame_left.pngbin0 -> 2023 bytes
-rw-r--r--src/tests/emotion/data/video_frame_right.pngbin0 -> 2441 bytes
-rw-r--r--src/tests/emotion/data/video_frame_top.pngbin0 -> 471 bytes
-rw-r--r--src/tests/emotion/data/whb.pngbin0 -> 207 bytes
-rw-r--r--src/tests/emotion/data/window_inner_shadow.pngbin0 -> 30426 bytes
-rw-r--r--src/tests/emotion/emotion_test_main.c748
26 files changed, 2429 insertions, 0 deletions
diff --git a/src/tests/emotion/data/bpause.png b/src/tests/emotion/data/bpause.png
new file mode 100644
index 0000000000..e827545157
--- /dev/null
+++ b/src/tests/emotion/data/bpause.png
Binary files differ
diff --git a/src/tests/emotion/data/bplay.png b/src/tests/emotion/data/bplay.png
new file mode 100644
index 0000000000..91644c6ef1
--- /dev/null
+++ b/src/tests/emotion/data/bplay.png
Binary files differ
diff --git a/src/tests/emotion/data/bstop.png b/src/tests/emotion/data/bstop.png
new file mode 100644
index 0000000000..a7be66d288
--- /dev/null
+++ b/src/tests/emotion/data/bstop.png
Binary files differ
diff --git a/src/tests/emotion/data/e_logo.png b/src/tests/emotion/data/e_logo.png
new file mode 100644
index 0000000000..0b79b69ab3
--- /dev/null
+++ b/src/tests/emotion/data/e_logo.png
Binary files differ
diff --git a/src/tests/emotion/data/fr1.png b/src/tests/emotion/data/fr1.png
new file mode 100644
index 0000000000..11670d79a5
--- /dev/null
+++ b/src/tests/emotion/data/fr1.png
Binary files differ
diff --git a/src/tests/emotion/data/fr2.png b/src/tests/emotion/data/fr2.png
new file mode 100644
index 0000000000..0b14911cfb
--- /dev/null
+++ b/src/tests/emotion/data/fr2.png
Binary files differ
diff --git a/src/tests/emotion/data/fr3.png b/src/tests/emotion/data/fr3.png
new file mode 100644
index 0000000000..8e524fd1cf
--- /dev/null
+++ b/src/tests/emotion/data/fr3.png
Binary files differ
diff --git a/src/tests/emotion/data/fr4.png b/src/tests/emotion/data/fr4.png
new file mode 100644
index 0000000000..fcbb28857b
--- /dev/null
+++ b/src/tests/emotion/data/fr4.png
Binary files differ
diff --git a/src/tests/emotion/data/fr5.png b/src/tests/emotion/data/fr5.png
new file mode 100644
index 0000000000..c4819d2777
--- /dev/null
+++ b/src/tests/emotion/data/fr5.png
Binary files differ
diff --git a/src/tests/emotion/data/fr6.png b/src/tests/emotion/data/fr6.png
new file mode 100644
index 0000000000..e674bf4d9f
--- /dev/null
+++ b/src/tests/emotion/data/fr6.png
Binary files differ
diff --git a/src/tests/emotion/data/fr7.png b/src/tests/emotion/data/fr7.png
new file mode 100644
index 0000000000..10476aa5ad
--- /dev/null
+++ b/src/tests/emotion/data/fr7.png
Binary files differ
diff --git a/src/tests/emotion/data/h_slider.png b/src/tests/emotion/data/h_slider.png
new file mode 100644
index 0000000000..688565aed2
--- /dev/null
+++ b/src/tests/emotion/data/h_slider.png
Binary files differ
diff --git a/src/tests/emotion/data/icon.edc b/src/tests/emotion/data/icon.edc
new file mode 100644
index 0000000000..0a3ea3dc7a
--- /dev/null
+++ b/src/tests/emotion/data/icon.edc
@@ -0,0 +1,14 @@
1collections {
2 images.image: "e_logo.png" COMP;
3 group { name: "icon";
4 min: 20 10;
5 parts {
6 part { name: "icon"; type: IMAGE;
7 mouse_events: 0;
8 description { state: "default" 0.0;
9 image.normal: "e_logo.png";
10 }
11 }
12 }
13 }
14}
diff --git a/src/tests/emotion/data/knob.png b/src/tests/emotion/data/knob.png
new file mode 100644
index 0000000000..f39f738a5c
--- /dev/null
+++ b/src/tests/emotion/data/knob.png
Binary files differ
diff --git a/src/tests/emotion/data/orb.png b/src/tests/emotion/data/orb.png
new file mode 100644
index 0000000000..9ab08a3f85
--- /dev/null
+++ b/src/tests/emotion/data/orb.png
Binary files differ
diff --git a/src/tests/emotion/data/pnl.png b/src/tests/emotion/data/pnl.png
new file mode 100644
index 0000000000..28f1915de5
--- /dev/null
+++ b/src/tests/emotion/data/pnl.png
Binary files differ
diff --git a/src/tests/emotion/data/sl.png b/src/tests/emotion/data/sl.png
new file mode 100644
index 0000000000..119d11f91b
--- /dev/null
+++ b/src/tests/emotion/data/sl.png
Binary files differ
diff --git a/src/tests/emotion/data/theme.edc b/src/tests/emotion/data/theme.edc
new file mode 100644
index 0000000000..63e732dc5a
--- /dev/null
+++ b/src/tests/emotion/data/theme.edc
@@ -0,0 +1,1667 @@
1images {
2 image: "tiles.png" COMP;
3 image: "window_inner_shadow.png" LOSSY 70;
4/* image: "e_logo.png" COMP;*/
5
6 image: "h_slider.png" COMP;
7/************/
8 image: "video_frame_left.png" COMP;
9 image: "video_frame_right.png" COMP;
10 image: "video_frame_top.png" COMP;
11 image: "video_frame_bottom.png" COMP;
12
13 image: "knob.png" COMP;
14
15 image: "fr1.png" COMP;
16 image: "fr2.png" COMP;
17 image: "fr3.png" COMP;
18 image: "fr4.png" COMP;
19 image: "fr5.png" COMP;
20 image: "fr6.png" COMP;
21 image: "fr7.png" COMP;
22 image: "sl.png" COMP;
23 image: "orb.png" COMP;
24 image: "whb.png" COMP;
25 image: "bpause.png" COMP;
26 image: "bplay.png" COMP;
27 image: "bstop.png" COMP;
28 image: "pnl.png" COMP;
29}
30
31collections {
32 group {
33 name: "background";
34 parts {
35 part {
36 name: "bg";
37 mouse_events: 0;
38 description {
39 state: "default" 0.0;
40 color_class: "background";
41 rel1 {
42 relative: 0.0 0.0;
43 offset: 0 0;
44 }
45 rel2 {
46 relative: 1.0 1.0;
47 offset: -1 -1;
48 }
49 fill {
50 smooth: 0;
51 origin {
52 relative: 0.0 0.0;
53 offset: 0 0;
54 }
55 size {
56 relative: 0.0 0.0;
57 offset: 128 128;
58 }
59 }
60 image {
61 normal: "tiles.png";
62 }
63 }
64 }
65/*
66 part {
67 name: "logo";
68 mouse_events: 0;
69 description {
70 state: "default" 0.0;
71 min: 120 140;
72 rel1 {
73 relative: 0.0 0.0;
74 offset: 48 48;
75 }
76 rel2 {
77 relative: 0.0 0.0;
78 offset: 140 140;
79 }
80 image {
81 normal: "e_logo.png";
82 }
83 }
84 }
85 */
86 part {
87 name: "shadow";
88 mouse_events: 0;
89 description {
90 state: "default" 0.0;
91 rel1 {
92 relative: 0.0 0.0;
93 offset: 0 0;
94 }
95 rel2 {
96 relative: 1.0 1.0;
97 offset: -1 -1;
98 }
99 image {
100 normal: "window_inner_shadow.png";
101 }
102 }
103 }
104 }
105 }
106#if 0
107 group {
108 name: "video_controller";
109 parts {
110 // need swallow parts:
111 // "video_swallow"
112 //
113 // need txt parts:
114 // "video_speed_txt"
115 // "video_progress_txt"
116 //
117 // need dragables:
118 // "video_progress" horizontal
119 // "video_speed" vertical
120 part {
121 name: "video_swallow";
122 mouse_events: 0;
123 type: SWALLOW;
124 clip_to: "vclip";
125 description {
126 state: "default" 0.0;
127 rel1 {
128 to: "fr_c1";
129 relative: 0.0 0.0;
130 offset: 20 20;
131 }
132 rel2 {
133 to: "fr_c4";
134 relative: 0.0 0.0;
135 offset: 14 14;
136 }
137 }
138 }
139 part {
140 name: "vclip";
141 mouse_events: 0;
142 type: RECT;
143 description {
144 state: "default" 0.0;
145 rel1 {
146 to: "fr_c1";
147 relative: 0.0 0.0;
148 offset: 20 20;
149 }
150 rel2 {
151 to: "fr_c4";
152 relative: 0.0 0.0;
153 offset: 14 14;
154 }
155 color: 255 255 255 255;
156 }
157 description {
158 state: "faded" 0.0;
159 rel1 {
160 to: "fr_c1";
161 relative: 0.0 0.0;
162 offset: 20 20;
163 }
164 rel2 {
165 to: "fr_c4";
166 relative: 0.0 0.0;
167 offset: 14 14;
168 }
169 color: 255 255 255 180;
170 }
171 description {
172 state: "dim" 0.0;
173 rel1 {
174 to: "fr_c1";
175 relative: 0.0 0.0;
176 offset: 20 20;
177 }
178 rel2 {
179 to: "fr_c4";
180 relative: 0.0 0.0;
181 offset: 14 14;
182 }
183 color: 255 255 255 80;
184 }
185 }
186 part {
187 name: "fr_c1";
188 mouse_events: 0;
189 description {
190 state: "default" 0.0;
191 rel1 {
192 relative: 0.0 0.0;
193 offset: 0 0;
194 }
195 rel2 {
196 relative: 0.0 0.0;
197 offset: 34 34;
198 }
199 image {
200 normal: "fr1.png";
201 }
202 }
203 }
204 part {
205 name: "fr_c2";
206 mouse_events: 0;
207 description {
208 state: "default" 0.0;
209 rel1 {
210 relative: 1.0 0.0;
211 offset: -35 0;
212 }
213 rel2 {
214 relative: 1.0 0.0;
215 offset: -1 34;
216 }
217 image {
218 normal: "fr6.png";
219 }
220 }
221 }
222 part {
223 name: "fr_c3";
224 mouse_events: 0;
225 description {
226 state: "default" 0.0;
227 rel1 {
228 relative: 0.0 1.0;
229 offset: 0 -35;
230 }
231 rel2 {
232 relative: 0.0 1.0;
233 offset: 34 -1;
234 }
235 image {
236 normal: "fr3.png";
237 }
238 }
239 }
240 part {
241 name: "fr_c4";
242 mouse_events: 0;
243 description {
244 state: "default" 0.0;
245 rel1 {
246 relative: 1.0 1.0;
247 offset: -35 -35;
248 }
249 rel2 {
250 relative: 1.0 1.0;
251 offset: 9 9;
252 }
253 image {
254 normal: "fr5.png";
255 }
256 }
257 }
258 part {
259 name: "fr_s1";
260 mouse_events: 0;
261 description {
262 state: "default" 0.0;
263 rel1 {
264 relative: 0.0 1.0;
265 offset: 0 0;
266 to: "fr_c1";
267 }
268 rel2 {
269 relative: 1.0 0.0;
270 offset: -1 -1;
271 to: "fr_c3";
272 }
273 image {
274 normal: "fr2.png";
275 }
276 }
277 }
278 part {
279 name: "fr_s2";
280 mouse_events: 0;
281 description {
282 state: "default" 0.0;
283 rel1 {
284 relative: 1.0 0.0;
285 offset: 0 0;
286 to: "fr_c3";
287 }
288 rel2 {
289 relative: 0.0 1.0;
290 offset: -1 -11;
291 to: "fr_c4";
292 }
293 image {
294 normal: "fr4.png";
295 }
296 }
297 }
298 part {
299 name: "fr_s3";
300 mouse_events: 0;
301 description {
302 state: "default" 0.0;
303 rel1 {
304 relative: 0.0 1.0;
305 offset: 0 0;
306 to: "fr_c2";
307 }
308 rel2 {
309 relative: 1.0 0.0;
310 offset: -11 -1;
311 to: "fr_c4";
312 }
313 image {
314 normal: "fr2.png";
315 }
316 }
317 }
318 part {
319 name: "fr_t";
320 mouse_events: 0;
321 description {
322 state: "default" 0.0;
323 rel1 {
324 relative: 1.0 0.0;
325 offset: 0 0;
326 to: "fr_c1";
327 }
328 rel2 {
329 relative: 0.0 1.0;
330 offset: -1 -1;
331 to: "fr_c2";
332 }
333 image {
334 border: 50 50 0 0;
335 normal: "fr7.png";
336 }
337 }
338 }
339 part {
340 name: "panel_bg";
341 mouse_events: 0;
342 clip_to: "panel_clip";
343 description {
344 state: "default" 0.0;
345 rel1 {
346 relative: 0.0 0.0;
347 offset: 0 0;
348 to: "panel_clip";
349 }
350 rel2 {
351 relative: 1.0 1.0;
352 offset: -1 -1;
353 to: "panel_clip";
354 }
355 image {
356 normal: "pnl.png";
357 }
358 fill {
359 smooth: 1;
360 origin {
361 relative: 0.0 0.0;
362 offset: 0 0;
363 }
364 size {
365 relative: 0.0 1.0;
366 offset: 32 0;
367 }
368 }
369 }
370 }
371 part {
372 name: "prog_container";
373 mouse_events: 0;
374 clip_to: "panel_clip";
375 description {
376 state: "default" 0.0;
377 rel1 {
378 relative: 0.0 0.0;
379 offset: 4 4;
380 to: "panel_clip";
381 }
382 rel2 {
383 relative: 1.0 0.0;
384 offset: -5 9;
385 to: "panel_clip";
386 }
387 image {
388 border: 2 2 2 2;
389 normal: "whb.png";
390 }
391 }
392 }
393 part {
394 name: "prog_done";
395 mouse_events: 0;
396 clip_to: "panel_clip";
397 description {
398 state: "default" 0.0;
399 rel1 {
400 relative: 0.0 0.0;
401 offset: 0 0;
402 to: "prog_container";
403 }
404 rel2 {
405 relative: 0.5 1.0;
406 offset: 0 -1;
407 to_x: "video_progress";
408 to_y: "prog_container";
409 }
410 image {
411 border: 2 2 2 2;
412 normal: "orb.png";
413 }
414 }
415 }
416 part {
417 name: "video_progress";
418 type: RECT;
419 clip_to: "panel_clip";
420 mouse_events: 1;
421 dragable {
422 x: 1 1 0;
423 y: 0 0 0;
424 confine: "prog_container";
425 }
426 description {
427 state: "default" 0.0;
428 min: 10 5;
429 align: 0.5 0.5;
430 rel1 {
431 to: "prog_container";
432 relative: 0.5 0.5;
433 offset: 0 0;
434 }
435 rel2 {
436 to: "prog_container";
437 relative: 0.5 0.5;
438 offset: 0 0;
439 }
440 color: 0 255 0 50;
441 }
442 }
443 part {
444 name: "video_progress_img";
445 mouse_events: 0;
446 clip_to: "panel_clip";
447 description {
448 state: "default" 0.0;
449 min: 9 16;
450 align: 0.5 1.0;
451 fixed: 1 1;
452 rel1 {
453 relative: 0.5 0.0;
454 offset: 0 0;
455 to_x: "video_progress";
456 to_y: "prog_container";
457 }
458 rel2 {
459 relative: 0.5 0.0;
460 offset: 0 0;
461 to_x: "video_progress";
462 to_y: "prog_container";
463 }
464 image {
465 normal: "sl.png";
466 }
467 }
468 }
469 part {
470 name: "b_stop";
471 mouse_events: 0;
472 clip_to: "panel_clip";
473 description {
474 state: "default" 0.0;
475 min: 22 22;
476 max: 22 22;
477 align: 0.0 0.0;
478 rel1 {
479 relative: 1.0 1.0;
480 offset: -5 -5;
481 to: "panel_clip";
482 }
483 rel2 {
484 relative: 1.0 1.0;
485 offset: -5 -5;
486 to: "panel_clip";
487 }
488 image {
489 normal: "bstop.png";
490 }
491 }
492 }
493 part {
494 name: "b_play";
495 mouse_events: 0;
496 clip_to: "panel_clip";
497 description {
498 state: "default" 0.0;
499 min: 22 22;
500 max: 22 22;
501 align: 0.0 1.0;
502 rel1 {
503 relative: 0.0 0.0;
504 offset: -1 0;
505 to: "b_stop";
506 }
507 rel2 {
508 relative: 0.0 0.0;
509 offset: -1 0;
510 to: "b_stop";
511 }
512 image {
513 normal: "bstop.png";
514 }
515 }
516 description {
517 state: "play" 0.0;
518 min: 22 22;
519 max: 22 22;
520 align: 0.0 1.0;
521 rel1 {
522 relative: 0.0 0.0;
523 offset: -1 0;
524 to: "b_stop";
525 }
526 rel2 {
527 relative: 0.0 0.0;
528 offset: -1 0;
529 to: "b_stop";
530 }
531 image {
532 normal: "bplay.png";
533 }
534 }
535 description {
536 state: "pause" 0.0;
537 min: 22 22;
538 max: 22 22;
539 align: 0.0 1.0;
540 rel1 {
541 relative: 0.0 0.0;
542 offset: -1 0;
543 to: "b_stop";
544 }
545 rel2 {
546 relative: 0.0 0.0;
547 offset: -1 0;
548 to: "b_stop";
549 }
550 image {
551 normal: "bpause.png";
552 }
553 }
554 }
555 part {
556 name: "panel_clip";
557 mouse_events: 0;
558 type: RECT;
559 clip_to: "vclip";
560 description {
561 visible: 0;
562 state: "default" 0.0;
563 rel1 {
564 to: "panel";
565 relative: 0.0 0.0;
566 offset: 0 0;
567 }
568 rel2 {
569 to: "panel";
570 relative: 1.0 1.0;
571 offset: -1 -1;
572 }
573 color: 255 255 255 0;
574 }
575 description {
576 visible: 1;
577 state: "shown" 0.0;
578 rel1 {
579 to: "panel";
580 relative: 0.0 0.0;
581 offset: 0 0;
582 }
583 rel2 {
584 to: "panel";
585 relative: 1.0 1.0;
586 offset: -1 -1;
587 }
588 color: 255 255 255 255;
589 }
590 }
591 part {
592 name: "video_progress_txt";
593 type: TEXT;
594 mouse_events: 0;
595 effect: OUTLINE;
596 description {
597 state: "default" 0.0;
598 rel1 {
599 to: "panel";
600 relative: 0.0 1.0;
601 offset: 0 -10;
602 }
603 rel2 {
604 to: "panel";
605 relative: 1.0 1.0;
606 offset: -1 -1;
607 }
608 color: 255 255 255 255;
609 color2: 0 0 0 255;
610 text {
611 text: "Video Progress";
612 font: "Sans";
613 size: 6;
614 align: 0.0 1.0;
615 };
616 }
617 }
618 part {
619 name: "panel";
620 mouse_events: 1;
621 type: RECT;
622 description {
623 state: "default" 0.0;
624 rel1 {
625 to: "fr_c3";
626 relative: 0.0 0.0;
627 offset: 20 -46;
628 }
629 rel2 {
630 to: "fr_c4";
631 relative: 0.0 0.0;
632 offset: 14 14;
633 }
634 color: 0 0 0 0;
635 }
636 }
637 part {
638 name: "panel2";
639 mouse_events: 1;
640 type: RECT;
641 description {
642 state: "default" 0.0;
643 rel1 {
644 to: "fr_c1";
645 relative: 0.0 0.0;
646 offset: 20 20;
647 }
648 rel2 {
649 to: "fr_c2";
650 relative: 1.0 0.0;
651 offset: -1 -1;
652 to: "panel";
653 }
654 color: 0 0 0 0;
655 }
656 }
657 part {
658 name: "video_resizer";
659 mouse_events: 1;
660 type: RECT;
661 description {
662 state: "default" 0.0;
663 rel1 {
664 to: "fr_c4";
665 relative: 0.0 0.0;
666 offset: 0 0;
667 }
668 rel2 {
669 to: "fr_c4";
670 relative: 1.0 1.0;
671 offset: -1 -1;
672 }
673 color: 0 0 0 0;
674 }
675 }
676 part {
677 name: "video_mover";
678 mouse_events: 1;
679 type: RECT;
680 description {
681 state: "default" 0.0;
682 rel1 {
683 to: "fr_t";
684 relative: 0.0 0.0;
685 offset: 0 0;
686 }
687 rel2 {
688 to: "fr_t";
689 relative: 1.0 1.0;
690 offset: -1 -1;
691 }
692 color: 0 0 0 0;
693 }
694 }
695 }
696 programs {
697 program {
698 name: "video_move_start";
699 signal: "mouse,down,*";
700 source: "video_mover";
701 action: SIGNAL_EMIT "frame_move" "start";
702 }
703 program {
704 name: "video_move_stop";
705 signal: "mouse,up,*";
706 source: "video_mover";
707 action: SIGNAL_EMIT "frame_move" "stop";
708 }
709 program {
710 name: "video_resize_start";
711 signal: "mouse,down,*";
712 source: "video_resizer";
713 action: SIGNAL_EMIT "frame_resize" "start";
714 }
715 program {
716 name: "video_resize_stop";
717 signal: "mouse,up,*";
718 source: "video_resizer";
719 action: SIGNAL_EMIT "frame_resize" "stop";
720 }
721 program {
722 name: "panel_show";
723 signal: "mouse,in";
724 source: "panel";
725 action: STATE_SET "shown" 0.0;
726 transition: LINEAR 1.0;
727 target: "panel_clip";
728 }
729 program {
730 name: "panel_hide";
731 signal: "mouse,in";
732 source: "panel2";
733 action: STATE_SET "default" 0.0;
734 transition: LINEAR 1.0;
735 target: "panel_clip";
736 }
737 }
738 }
739#else
740 group {
741 name: "video_controller";
742 parts {
743 // need swallow parts:
744 // "video_swallow"
745 //
746 // need txt parts:
747 // "video_speed_txt"
748 // "video_progress_txt"
749 //
750 // need dragables:
751 // "video_progress" horizontal
752 // "video_speed" vertical
753 part {
754 name: "video_swallow";
755 mouse_events: 0;
756 type: SWALLOW;
757 description {
758 state: "default" 0.0;
759 rel1 {
760 to: "video_frame_left";
761 relative: 1.0 0.0;
762 offset: -8 23;
763 }
764 rel2 {
765 to: "video_frame_right";
766 relative: 0.0 1.0;
767 offset: 7 -25;
768 }
769 }
770 }
771 part {
772 name: "video_frame_left";
773 mouse_events: 0;
774 description {
775 state: "default" 0.0;
776 rel1 {
777 relative: 0.0 0.0;
778 offset: 0 0;
779 }
780 rel2 {
781 relative: 0.0 1.0;
782 offset: 32 -1;
783 }
784 image {
785 border: 0 0 33 33;
786 normal: "video_frame_left.png";
787 }
788 }
789 }
790 part {
791 name: "video_frame_right";
792 mouse_events: 0;
793 description {
794 state: "default" 0.0;
795 rel1 {
796 relative: 1.0 0.0;
797 offset: -32 0;
798 }
799 rel2 {
800 relative: 1.0 1.0;
801 offset: -1 -1;
802 }
803 image {
804 border: 0 0 33 33;
805 normal: "video_frame_right.png";
806 }
807 }
808 }
809 part {
810 name: "video_frame_top";
811 mouse_events: 0;
812 description {
813 state: "default" 0.0;
814 rel1 {
815 to: "video_frame_left";
816 relative: 1.0 0.0;
817 offset: 0 0;
818 }
819 rel2 {
820 to: "video_frame_right";
821 relative: 0.0 0.0;
822 offset: -1 31;
823 }
824 image {
825 normal: "video_frame_top.png";
826 }
827 }
828 }
829 part {
830 name: "video_frame_bottom";
831 mouse_events: 0;
832 description {
833 state: "default" 0.0;
834 rel1 {
835 to: "video_frame_left";
836 relative: 1.0 1.0;
837 offset: 0 -32;
838 }
839 rel2 {
840 to: "video_frame_right";
841 relative: 0.0 1.0;
842 offset: -1 -1;
843 }
844 image {
845 normal: "video_frame_bottom.png";
846 }
847 }
848 }
849 part {
850 name: "video_speed_txt";
851 type: TEXT;
852 mouse_events: 0;
853 description {
854 state: "default" 0.0;
855 rel1 {
856 to: "video_frame_bottom";
857 relative: 0.0 0.0;
858 offset: 0 8;
859 }
860 rel2 {
861 to: "video_frame_bottom";
862 relative: 1.0 1.0;
863 offset: -1 -13;
864 }
865 color: 0 0 0 255;
866 text {
867 text: "Video Speed";
868 font: "Sans";
869 size: 6;
870 align: 1.0 0.5;
871 };
872 }
873 }
874 part {
875 name: "video_progress_confine";
876 mouse_events: 0;
877 type: RECT;
878 description {
879 state: "default" 0.0;
880 fixed: 1 1;
881 min: 1 18;
882 align: 0.5 0.0;
883 rel1 {
884 to: "video_frame_left";
885 relative: 1.0 1.0;
886 offset: 0 -25;
887 }
888 rel2 {
889 to: "video_frame_right";
890 relative: 0.0 1.0;
891 offset: -1 -25;
892 }
893 color: 0 0 0 0;
894 }
895 }
896 part {
897 name: "video_progress";
898 type: RECT;
899 mouse_events: 1;
900 dragable {
901 x: 1 1 0;
902 y: 0 0 0;
903 confine: "video_progress_confine";
904 }
905 description {
906 state: "default" 0.0;
907 fixed: 1 1;
908 min: 34 18;
909 rel1 {
910 to: "video_progress_confine";
911 relative: 0.5 0.5;
912 offset: 0 0;
913 }
914 rel2 {
915 to: "video_progress_confine";
916 relative: 0.5 0.5;
917 offset: 0 0;
918 }
919 color: 0 0 0 0;
920 }
921 }
922 part {
923 name: "video_progress_img";
924 mouse_events: 0;
925 description {
926 state: "default" 0.0;
927 fixed: 1 1;
928 min: 42 26;
929 rel1 {
930 to: "video_progress";
931 relative: 0.5 0.5;
932 offset: 0 0;
933 }
934 rel2 {
935 to: "video_progress";
936 relative: 0.5 0.5;
937 offset: 0 0;
938 }
939 image {
940 normal: "h_slider.png";
941 }
942 }
943 }
944 part {
945 name: "video_speed_confine";
946 mouse_events: 0;
947 type: RECT;
948 description {
949 state: "default" 0.0;
950 rel1 {
951 to: "video_frame_left";
952 relative: 1.0 0.0;
953 offset: 0 24;
954 }
955 rel2 {
956 to: "video_frame_left";
957 relative: 1.0 1.0;
958 offset: 48 -49;
959 }
960 color: 0 0 0 0;
961 }
962 }
963 part {
964 name: "video_speed";
965 mouse_events: 1;
966 dragable {
967 x: 0 0 0;
968 y: -1 1 0;
969 confine: "video_speed_confine";
970 }
971 description {
972 state: "default" 0.0;
973 fixed: 1 1;
974 min: 24 24;
975 rel1 {
976 to: "video_speed_confine";
977 relative: 0.5 0.5;
978 offset: 0 0;
979 }
980 rel2 {
981 to: "video_speed_confine";
982 relative: 0.5 0.5;
983 offset: 0 0;
984 }
985 image {
986 normal: "knob.png";
987 }
988 }
989 }
990 part {
991 name: "video_play";
992 mouse_events: 1;
993 description {
994 state: "default" 0.0;
995 fixed: 1 1;
996 min: 24 24;
997 rel1 {
998 to: "video_frame_bottom";
999 relative: 0.0 0.5;
1000 offset: 0 0;
1001 }
1002 rel2 {
1003 to: "video_frame_bottom";
1004 relative: 0.0 0.5;
1005 offset: 0 0;
1006 }
1007 image {
1008 normal: "knob.png";
1009 }
1010 }
1011 }
1012 part {
1013 name: "video_pause";
1014 mouse_events: 1;
1015 description {
1016 state: "default" 0.0;
1017 fixed: 1 1;
1018 min: 24 24;
1019 rel1 {
1020 to: "video_frame_bottom";
1021 relative: 0.5 0.5;
1022 offset: 0 0;
1023 }
1024 rel2 {
1025 to: "video_frame_bottom";
1026 relative: 0.5 0.5;
1027 offset: 0 0;
1028 }
1029 image {
1030 normal: "knob.png";
1031 }
1032 }
1033 }
1034 part {
1035 name: "video_stop";
1036 mouse_events: 1;
1037 description {
1038 state: "default" 0.0;
1039 fixed: 1 1;
1040 min: 24 24;
1041 rel1 {
1042 to: "video_frame_bottom";
1043 relative: 1.0 0.5;
1044 offset: 0 0;
1045 }
1046 rel2 {
1047 to: "video_frame_bottom";
1048 relative: 1.0 0.5;
1049 offset: 0 0;
1050 }
1051 image {
1052 normal: "knob.png";
1053 }
1054 }
1055 }
1056 part {
1057 name: "video_mover";
1058 mouse_events: 1;
1059 type: RECT;
1060 description {
1061 state: "default" 0.0;
1062 rel1 {
1063 to: "video_frame_top";
1064 relative: 0.0 0.0;
1065 offset: 0 0;
1066 }
1067 rel2 {
1068 to: "video_frame_top";
1069 relative: 1.0 1.0;
1070 offset: -1 -1;
1071 }
1072 color: 255 20 20 20;
1073 }
1074 }
1075 part {
1076 name: "video_resizer";
1077 mouse_events: 1;
1078 type: RECT;
1079 description {
1080 state: "default" 0.0;
1081 rel1 {
1082 to: "video_frame_right";
1083 relative: 0.0 1.0;
1084 offset: 0 -31;
1085 }
1086 rel2 {
1087 to: "video_frame_right";
1088 relative: 1.0 1.0;
1089 offset: -1 -1;
1090 }
1091 color: 20 20 255 20;
1092 }
1093 }
1094 part {
1095 name: "video_progress_txt";
1096 type: TEXT;
1097 mouse_events: 0;
1098 effect: OUTLINE;
1099 description {
1100 state: "default" 0.0;
1101 align: 1.0 1.0;
1102 fixed: 1 1;
1103 rel1 {
1104 relative: 1.0 1.0;
1105 offset: -2 -2;
1106 }
1107 rel2 {
1108 relative: 1.0 1.0;
1109 offset: -2 -2;
1110 }
1111 color: 255 255 255 255;
1112 color2: 0 0 0 255;
1113 text {
1114 text: "XX:XX:XX / XX:XX:XX";
1115 font: "Sans";
1116 size: 10;
1117 align: 1.0 1.0;
1118 min: 1 1;
1119 };
1120 }
1121 }
1122 }
1123 programs {
1124 // emit signals:
1125 // "video_control" "play"
1126 // "video_control" "pause"
1127 // "video_control" "stop"
1128 // "drag" "video_progress"
1129 // "drag" "video_speed"
1130 //
1131 // get signals:
1132 // "video_state" "play"
1133 // "video_state" "pause"
1134 // "video_state" "stop"
1135 program {
1136 name: "video_play";
1137 signal: "mouse,down,1";
1138 source: "video_play";
1139 action: SIGNAL_EMIT "video_control" "play";
1140 }
1141 program {
1142 name: "video_pause";
1143 signal: "mouse,down,1";
1144 source: "video_pause";
1145 action: SIGNAL_EMIT "video_control" "pause";
1146 }
1147 program {
1148 name: "video_stop";
1149 signal: "mouse,down,1";
1150 source: "video_stop";
1151 action: SIGNAL_EMIT "video_control" "stop";
1152 }
1153 program {
1154 name: "video_move_start";
1155 signal: "mouse,down,*";
1156 source: "video_mover";
1157 action: SIGNAL_EMIT "frame_move" "start";
1158 }
1159 program {
1160 name: "video_move_stop";
1161 signal: "mouse,up,*";
1162 source: "video_mover";
1163 action: SIGNAL_EMIT "frame_move" "stop";
1164 }
1165 program {
1166 name: "video_resize_start";
1167 signal: "mouse,down,*";
1168 source: "video_resizer";
1169 action: SIGNAL_EMIT "frame_resize" "start";
1170 }
1171 program {
1172 name: "video_resize_stop";
1173 signal: "mouse,up,*";
1174 source: "video_resizer";
1175 action: SIGNAL_EMIT "frame_resize" "stop";
1176 }
1177 }
1178 }
1179
1180 group {
1181 name: "video_controller/reflex";
1182 parts {
1183 // need swallow parts:
1184 // "video_swallow"
1185 //
1186 // need txt parts:
1187 // "video_speed_txt"
1188 // "video_progress_txt"
1189 //
1190 // need dragables:
1191 // "video_progress" horizontal
1192 // "video_speed" vertical
1193 part {
1194 name: "video_swallow";
1195 mouse_events: 0;
1196 type: SWALLOW;
1197 description {
1198 state: "default" 0.0;
1199 rel1 {
1200 to: "video_frame_left";
1201 relative: 1.0 0.0;
1202 offset: -8 23;
1203 }
1204 rel2 {
1205 to: "video_frame_right";
1206 relative: 0.0 1.0;
1207 offset: 7 -25;
1208 }
1209 }
1210 }
1211
1212 part {
1213 name: "swallow_center";
1214 type: RECT;
1215 description {
1216 state: "default" 0.0;
1217 visible: 0;
1218 rel1 {
1219 to: "video_swallow";
1220 relative: 0.5 1.0;
1221 }
1222 rel2 {
1223 to: "video_swallow";
1224 relative: 0.5 1.0;
1225 }
1226 }
1227 }
1228 part {
1229 name: "swallow_mirror";
1230 type: PROXY;
1231 mouse_events: 0;
1232 description {
1233 state: "default" 0.0;
1234 source: "video_swallow";
1235 rel1 {
1236 to: "video_swallow";
1237 }
1238 rel2 {
1239 to: "video_swallow";
1240 }
1241 perspective {
1242 zplane: 0;
1243 focal: 1000;
1244 }
1245 color: 255 255 255 96;
1246 map {
1247 on: 1;
1248 smooth: 0;
1249 alpha: 1;
1250 rotation {
1251 center: "swallow_center";
1252 x: 100;
1253 }
1254 }
1255 }
1256 }
1257
1258 part {
1259 name: "video_frame_left";
1260 mouse_events: 0;
1261 description {
1262 state: "default" 0.0;
1263 rel1 {
1264 relative: 0.0 0.0;
1265 offset: 0 0;
1266 }
1267 rel2 {
1268 relative: 0.0 1.0;
1269 offset: 32 -1;
1270 }
1271 image {
1272 border: 0 0 33 33;
1273 normal: "video_frame_left.png";
1274 }
1275 }
1276 }
1277 part {
1278 name: "video_frame_right";
1279 mouse_events: 0;
1280 description {
1281 state: "default" 0.0;
1282 rel1 {
1283 relative: 1.0 0.0;
1284 offset: -32 0;
1285 }
1286 rel2 {
1287 relative: 1.0 1.0;
1288 offset: -1 -1;
1289 }
1290 image {
1291 border: 0 0 33 33;
1292 normal: "video_frame_right.png";
1293 }
1294 }
1295 }
1296 part {
1297 name: "video_frame_top";
1298 mouse_events: 0;
1299 description {
1300 state: "default" 0.0;
1301 rel1 {
1302 to: "video_frame_left";
1303 relative: 1.0 0.0;
1304 offset: 0 0;
1305 }
1306 rel2 {
1307 to: "video_frame_right";
1308 relative: 0.0 0.0;
1309 offset: -1 31;
1310 }
1311 image {
1312 normal: "video_frame_top.png";
1313 }
1314 }
1315 }
1316 part {
1317 name: "video_frame_bottom";
1318 mouse_events: 0;
1319 description {
1320 state: "default" 0.0;
1321 rel1 {
1322 to: "video_frame_left";
1323 relative: 1.0 1.0;
1324 offset: 0 -32;
1325 }
1326 rel2 {
1327 to: "video_frame_right";
1328 relative: 0.0 1.0;
1329 offset: -1 -1;
1330 }
1331 image {
1332 normal: "video_frame_bottom.png";
1333 }
1334 }
1335 }
1336 part {
1337 name: "video_speed_txt";
1338 type: TEXT;
1339 mouse_events: 0;
1340 description {
1341 state: "default" 0.0;
1342 rel1 {
1343 to: "video_frame_bottom";
1344 relative: 0.0 0.0;
1345 offset: 0 8;
1346 }
1347 rel2 {
1348 to: "video_frame_bottom";
1349 relative: 1.0 1.0;
1350 offset: -1 -13;
1351 }
1352 color: 0 0 0 255;
1353 text {
1354 text: "Video Speed";
1355 font: "Sans";
1356 size: 6;
1357 align: 1.0 0.5;
1358 };
1359 }
1360 }
1361 part {
1362 name: "video_progress_confine";
1363 mouse_events: 0;
1364 type: RECT;
1365 description {
1366 state: "default" 0.0;
1367 fixed: 1 1;
1368 min: 1 18;
1369 align: 0.5 0.0;
1370 rel1 {
1371 to: "video_frame_left";
1372 relative: 1.0 1.0;
1373 offset: 0 -25;
1374 }
1375 rel2 {
1376 to: "video_frame_right";
1377 relative: 0.0 1.0;
1378 offset: -1 -25;
1379 }
1380 color: 0 0 0 0;
1381 }
1382 }
1383 part {
1384 name: "video_progress";
1385 type: RECT;
1386 mouse_events: 1;
1387 dragable {
1388 x: 1 1 0;
1389 y: 0 0 0;
1390 confine: "video_progress_confine";
1391 }
1392 description {
1393 state: "default" 0.0;
1394 fixed: 1 1;
1395 min: 34 18;
1396 rel1 {
1397 to: "video_progress_confine";
1398 relative: 0.5 0.5;
1399 offset: 0 0;
1400 }
1401 rel2 {
1402 to: "video_progress_confine";
1403 relative: 0.5 0.5;
1404 offset: 0 0;
1405 }
1406 color: 0 0 0 0;
1407 }
1408 }
1409 part {
1410 name: "video_progress_img";
1411 mouse_events: 0;
1412 description {
1413 state: "default" 0.0;
1414 fixed: 1 1;
1415 min: 42 26;
1416 rel1 {
1417 to: "video_progress";
1418 relative: 0.5 0.5;
1419 offset: 0 0;
1420 }
1421 rel2 {
1422 to: "video_progress";
1423 relative: 0.5 0.5;
1424 offset: 0 0;
1425 }
1426 image {
1427 normal: "h_slider.png";
1428 }
1429 }
1430 }
1431 part {
1432 name: "video_speed_confine";
1433 mouse_events: 0;
1434 type: RECT;
1435 description {
1436 state: "default" 0.0;
1437 rel1 {
1438 to: "video_frame_left";
1439 relative: 1.0 0.0;
1440 offset: 0 24;
1441 }
1442 rel2 {
1443 to: "video_frame_left";
1444 relative: 1.0 1.0;
1445 offset: 48 -49;
1446 }
1447 color: 0 0 0 0;
1448 }
1449 }
1450 part {
1451 name: "video_speed";
1452 mouse_events: 1;
1453 dragable {
1454 x: 0 0 0;
1455 y: -1 1 0;
1456 confine: "video_speed_confine";
1457 }
1458 description {
1459 state: "default" 0.0;
1460 fixed: 1 1;
1461 min: 24 24;
1462 rel1 {
1463 to: "video_speed_confine";
1464 relative: 0.5 0.5;
1465 offset: 0 0;
1466 }
1467 rel2 {
1468 to: "video_speed_confine";
1469 relative: 0.5 0.5;
1470 offset: 0 0;
1471 }
1472 image {
1473 normal: "knob.png";
1474 }
1475 }
1476 }
1477 part {
1478 name: "video_play";
1479 mouse_events: 1;
1480 description {
1481 state: "default" 0.0;
1482 fixed: 1 1;
1483 min: 24 24;
1484 rel1 {
1485 to: "video_frame_bottom";
1486 relative: 0.0 0.5;
1487 offset: 0 0;
1488 }
1489 rel2 {
1490 to: "video_frame_bottom";
1491 relative: 0.0 0.5;
1492 offset: 0 0;
1493 }
1494 image {
1495 normal: "knob.png";
1496 }
1497 }
1498 }
1499 part {
1500 name: "video_pause";
1501 mouse_events: 1;
1502 description {
1503 state: "default" 0.0;
1504 fixed: 1 1;
1505 min: 24 24;
1506 rel1 {
1507 to: "video_frame_bottom";
1508 relative: 0.5 0.5;
1509 offset: 0 0;
1510 }
1511 rel2 {
1512 to: "video_frame_bottom";
1513 relative: 0.5 0.5;
1514 offset: 0 0;
1515 }
1516 image {
1517 normal: "knob.png";
1518 }
1519 }
1520 }
1521 part {
1522 name: "video_stop";
1523 mouse_events: 1;
1524 description {
1525 state: "default" 0.0;
1526 fixed: 1 1;
1527 min: 24 24;
1528 rel1 {
1529 to: "video_frame_bottom";
1530 relative: 1.0 0.5;
1531 offset: 0 0;
1532 }
1533 rel2 {
1534 to: "video_frame_bottom";
1535 relative: 1.0 0.5;
1536 offset: 0 0;
1537 }
1538 image {
1539 normal: "knob.png";
1540 }
1541 }
1542 }
1543 part {
1544 name: "video_mover";
1545 mouse_events: 1;
1546 type: RECT;
1547 description {
1548 state: "default" 0.0;
1549 rel1 {
1550 to: "video_frame_top";
1551 relative: 0.0 0.0;
1552 offset: 0 0;
1553 }
1554 rel2 {
1555 to: "video_frame_top";
1556 relative: 1.0 1.0;
1557 offset: -1 -1;
1558 }
1559 color: 255 20 20 20;
1560 }
1561 }
1562 part {
1563 name: "video_resizer";
1564 mouse_events: 1;
1565 type: RECT;
1566 description {
1567 state: "default" 0.0;
1568 rel1 {
1569 to: "video_frame_right";
1570 relative: 0.0 1.0;
1571 offset: 0 -31;
1572 }
1573 rel2 {
1574 to: "video_frame_right";
1575 relative: 1.0 1.0;
1576 offset: -1 -1;
1577 }
1578 color: 20 20 255 20;
1579 }
1580 }
1581 part {
1582 name: "video_progress_txt";
1583 type: TEXT;
1584 mouse_events: 0;
1585 effect: OUTLINE;
1586 description {
1587 state: "default" 0.0;
1588 align: 1.0 1.0;
1589 fixed: 1 1;
1590 rel1 {
1591 relative: 1.0 1.0;
1592 offset: -2 -2;
1593 }
1594 rel2 {
1595 relative: 1.0 1.0;
1596 offset: -2 -2;
1597 }
1598 color: 255 255 255 255;
1599 color2: 0 0 0 255;
1600 text {
1601 text: "XX:XX:XX / XX:XX:XX";
1602 font: "Sans";
1603 size: 10;
1604 align: 1.0 1.0;
1605 min: 1 1;
1606 };
1607 }
1608 }
1609 }
1610 programs {
1611 // emit signals:
1612 // "video_control" "play"
1613 // "video_control" "pause"
1614 // "video_control" "stop"
1615 // "drag" "video_progress"
1616 // "drag" "video_speed"
1617 //
1618 // get signals:
1619 // "video_state" "play"
1620 // "video_state" "pause"
1621 // "video_state" "stop"
1622 program {
1623 name: "video_play";
1624 signal: "mouse,down,1";
1625 source: "video_play";
1626 action: SIGNAL_EMIT "video_control" "play";
1627 }
1628 program {
1629 name: "video_pause";
1630 signal: "mouse,down,1";
1631 source: "video_pause";
1632 action: SIGNAL_EMIT "video_control" "pause";
1633 }
1634 program {
1635 name: "video_stop";
1636 signal: "mouse,down,1";
1637 source: "video_stop";
1638 action: SIGNAL_EMIT "video_control" "stop";
1639 }
1640 program {
1641 name: "video_move_start";
1642 signal: "mouse,down,*";
1643 source: "video_mover";
1644 action: SIGNAL_EMIT "frame_move" "start";
1645 }
1646 program {
1647 name: "video_move_stop";
1648 signal: "mouse,up,*";
1649 source: "video_mover";
1650 action: SIGNAL_EMIT "frame_move" "stop";
1651 }
1652 program {
1653 name: "video_resize_start";
1654 signal: "mouse,down,*";
1655 source: "video_resizer";
1656 action: SIGNAL_EMIT "frame_resize" "start";
1657 }
1658 program {
1659 name: "video_resize_stop";
1660 signal: "mouse,up,*";
1661 source: "video_resizer";
1662 action: SIGNAL_EMIT "frame_resize" "stop";
1663 }
1664 }
1665 }
1666#endif
1667}
diff --git a/src/tests/emotion/data/tiles.png b/src/tests/emotion/data/tiles.png
new file mode 100644
index 0000000000..7e92bd15fa
--- /dev/null
+++ b/src/tests/emotion/data/tiles.png
Binary files differ
diff --git a/src/tests/emotion/data/video_frame_bottom.png b/src/tests/emotion/data/video_frame_bottom.png
new file mode 100644
index 0000000000..97eb5dd5a6
--- /dev/null
+++ b/src/tests/emotion/data/video_frame_bottom.png
Binary files differ
diff --git a/src/tests/emotion/data/video_frame_left.png b/src/tests/emotion/data/video_frame_left.png
new file mode 100644
index 0000000000..3d27d84d01
--- /dev/null
+++ b/src/tests/emotion/data/video_frame_left.png
Binary files differ
diff --git a/src/tests/emotion/data/video_frame_right.png b/src/tests/emotion/data/video_frame_right.png
new file mode 100644
index 0000000000..1cefbafcef
--- /dev/null
+++ b/src/tests/emotion/data/video_frame_right.png
Binary files differ
diff --git a/src/tests/emotion/data/video_frame_top.png b/src/tests/emotion/data/video_frame_top.png
new file mode 100644
index 0000000000..9317a61478
--- /dev/null
+++ b/src/tests/emotion/data/video_frame_top.png
Binary files differ
diff --git a/src/tests/emotion/data/whb.png b/src/tests/emotion/data/whb.png
new file mode 100644
index 0000000000..5f141d4b6d
--- /dev/null
+++ b/src/tests/emotion/data/whb.png
Binary files differ
diff --git a/src/tests/emotion/data/window_inner_shadow.png b/src/tests/emotion/data/window_inner_shadow.png
new file mode 100644
index 0000000000..93410708e5
--- /dev/null
+++ b/src/tests/emotion/data/window_inner_shadow.png
Binary files differ
diff --git a/src/tests/emotion/emotion_test_main.c b/src/tests/emotion/emotion_test_main.c
new file mode 100644
index 0000000000..5bf3d3ab8a
--- /dev/null
+++ b/src/tests/emotion/emotion_test_main.c
@@ -0,0 +1,748 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include <stdlib.h>
6#include <stdio.h>
7#include <string.h>
8
9#include <Evas.h>
10#include <Ecore.h>
11#include <Ecore_Getopt.h>
12#include <Ecore_Evas.h>
13#include <Edje.h>
14
15#include "Emotion.h"
16
17static const Ecore_Getopt options = {
18 "emotion_test",
19 "%prog [options] <filename>",
20 "1.0.0",
21 "(C) 2011 Enlightenment",
22 "BSD\nThis is a 3 clause bsd bla bla",
23 "a simple test program for emotion.",
24 1,
25 {
26 ECORE_GETOPT_STORE_STR('e', "engine", "ecore-evas engine to use"),
27 ECORE_GETOPT_CALLBACK_NOARGS('E', "list-engines", "list ecore-evas engines",
28 ecore_getopt_callback_ecore_evas_list_engines, NULL),
29 ECORE_GETOPT_CALLBACK_ARGS('g', "geometry", "geometry to use in x:y:w:h form.", "X:Y:W:H",
30 ecore_getopt_callback_geometry_parse, NULL),
31 ECORE_GETOPT_STORE_STR('b', "backend", "backend to use"),
32 ECORE_GETOPT_STORE_INT('v', "vis", "visualization type"),
33 ECORE_GETOPT_COUNT('v', "verbose", "be more verbose"),
34 ECORE_GETOPT_STORE_TRUE('R', "reflex", "show video reflex effect"),
35 ECORE_GETOPT_VERSION('V', "version"),
36 ECORE_GETOPT_COPYRIGHT('R', "copyright"),
37 ECORE_GETOPT_LICENSE('L', "license"),
38 ECORE_GETOPT_HELP('h', "help"),
39 ECORE_GETOPT_SENTINEL
40 }
41};
42
43typedef struct _Frame_Data Frame_Data;
44
45struct _Frame_Data
46{
47 unsigned char moving : 1;
48 unsigned char resizing : 1;
49 int button;
50 Evas_Coord x, y;
51};
52
53static void main_resize(Ecore_Evas *ee);
54static Eina_Bool main_signal_exit(void *data, int ev_type, void *ev);
55static void main_delete_request(Ecore_Evas *ee);
56
57static void bg_setup(void);
58static void bg_resize(Evas_Coord w, Evas_Coord h);
59static void bg_key_down(void *data, Evas * e, Evas_Object * obj, void *event_info);
60
61static Evas_Object *o_bg = NULL;
62
63static double start_time = 0.0;
64static Ecore_Evas *ecore_evas = NULL;
65static Evas *evas = NULL;
66static int startw = 800;
67static int starth = 600;
68
69static Eina_List *video_objs = NULL;
70static Emotion_Vis vis = EMOTION_VIS_NONE;
71static unsigned char reflex = 0;
72
73static void
74main_resize(Ecore_Evas *ee)
75{
76 Evas_Coord w, h;
77
78 evas_output_viewport_get(ecore_evas_get(ee), NULL, NULL, &w, &h);
79 bg_resize(w, h);
80}
81
82static Eina_Bool
83main_signal_exit(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_UNUSED)
84{
85 Evas_Object *o;
86
87 ecore_main_loop_quit();
88 EINA_LIST_FREE(video_objs, o)
89 {
90 emotion_object_last_position_save(o);
91 evas_object_del(o);
92 }
93 return EINA_TRUE;
94}
95
96static void
97main_delete_request(Ecore_Evas *ee EINA_UNUSED)
98{
99 ecore_main_loop_quit();
100}
101
102void
103bg_setup(void)
104{
105 Evas_Object *o;
106
107 o = edje_object_add(evas);
108 edje_object_file_set(o, PACKAGE_DATA_DIR"/data/theme.edj", "background");
109 evas_object_move(o, 0, 0);
110 evas_object_resize(o, startw, starth);
111 evas_object_layer_set(o, -999);
112 evas_object_show(o);
113 evas_object_focus_set(o, 1);
114 evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN, bg_key_down, NULL);
115 o_bg = o;
116}
117
118void
119bg_resize(Evas_Coord w, Evas_Coord h)
120{
121 evas_object_resize(o_bg, w, h);
122}
123
124static void
125broadcast_event(Emotion_Event ev)
126{
127 Eina_List *l;
128 Evas_Object *obj;
129
130 EINA_LIST_FOREACH(video_objs, l, obj)
131 emotion_object_event_simple_send(obj, ev);
132}
133
134static void
135bg_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
136{
137 Evas_Event_Key_Down *ev = event_info;
138 Eina_List *l;
139 Evas_Object *o;
140
141 if (!strcmp(ev->keyname, "Escape"))
142 ecore_main_loop_quit();
143 else if (!strcmp(ev->keyname, "Up"))
144 broadcast_event(EMOTION_EVENT_UP);
145 else if (!strcmp(ev->keyname, "Down"))
146 broadcast_event(EMOTION_EVENT_DOWN);
147 else if (!strcmp(ev->keyname, "Left"))
148 broadcast_event(EMOTION_EVENT_LEFT);
149 else if (!strcmp(ev->keyname, "Right"))
150 broadcast_event(EMOTION_EVENT_RIGHT);
151 else if (!strcmp(ev->keyname, "Return"))
152 broadcast_event(EMOTION_EVENT_SELECT);
153 else if (!strcmp(ev->keyname, "m"))
154 broadcast_event(EMOTION_EVENT_MENU1);
155 else if (!strcmp(ev->keyname, "Prior"))
156 broadcast_event(EMOTION_EVENT_PREV);
157 else if (!strcmp(ev->keyname, "Next"))
158 broadcast_event(EMOTION_EVENT_NEXT);
159 else if (!strcmp(ev->keyname, "0"))
160 broadcast_event(EMOTION_EVENT_0);
161 else if (!strcmp(ev->keyname, "1"))
162 broadcast_event(EMOTION_EVENT_1);
163 else if (!strcmp(ev->keyname, "2"))
164 broadcast_event(EMOTION_EVENT_2);
165 else if (!strcmp(ev->keyname, "3"))
166 broadcast_event(EMOTION_EVENT_3);
167 else if (!strcmp(ev->keyname, "4"))
168 broadcast_event(EMOTION_EVENT_4);
169 else if (!strcmp(ev->keyname, "5"))
170 broadcast_event(EMOTION_EVENT_5);
171 else if (!strcmp(ev->keyname, "6"))
172 broadcast_event(EMOTION_EVENT_6);
173 else if (!strcmp(ev->keyname, "7"))
174 broadcast_event(EMOTION_EVENT_7);
175 else if (!strcmp(ev->keyname, "8"))
176 broadcast_event(EMOTION_EVENT_8);
177 else if (!strcmp(ev->keyname, "9"))
178 broadcast_event(EMOTION_EVENT_9);
179 else if (!strcmp(ev->keyname, "-"))
180 broadcast_event(EMOTION_EVENT_10);
181 else if (!strcmp(ev->keyname, "bracketleft"))
182 {
183 EINA_LIST_FOREACH(video_objs, l, o)
184 emotion_object_audio_volume_set(o, emotion_object_audio_volume_get(o) - 0.1);
185 }
186 else if (!strcmp(ev->keyname, "bracketright"))
187 {
188 EINA_LIST_FOREACH(video_objs, l, o)
189 emotion_object_audio_volume_set(o, emotion_object_audio_volume_get(o) + 0.1);
190 }
191 else if (!strcmp(ev->keyname, "v"))
192 {
193 EINA_LIST_FOREACH(video_objs, l, o)
194 {
195 if (emotion_object_video_mute_get(o))
196 emotion_object_video_mute_set(o, 0);
197 else
198 emotion_object_video_mute_set(o, 1);
199 }
200 }
201 else if (!strcmp(ev->keyname, "a"))
202 {
203 EINA_LIST_FOREACH(video_objs, l, o)
204 {
205 if (emotion_object_audio_mute_get(o))
206 {
207 emotion_object_audio_mute_set(o, 0);
208 printf("unmute\n");
209 }
210 else
211 {
212 emotion_object_audio_mute_set(o, 1);
213 printf("mute\n");
214 }
215 }
216 }
217 else if (!strcmp(ev->keyname, "i"))
218 {
219 EINA_LIST_FOREACH(video_objs, l, o)
220 {
221 printf("audio channels: %i\n", emotion_object_audio_channel_count(o));
222 printf("video channels: %i\n", emotion_object_video_channel_count(o));
223 printf("spu channels: %i\n", emotion_object_spu_channel_count(o));
224 printf("seekable: %i\n", emotion_object_seekable_get(o));
225 }
226 }
227 else if (!strcmp(ev->keyname, "f"))
228 {
229 if (!ecore_evas_fullscreen_get(ecore_evas))
230 ecore_evas_fullscreen_set(ecore_evas, 1);
231 else
232 ecore_evas_fullscreen_set(ecore_evas, 0);
233 }
234 else if (!strcmp(ev->keyname, "d"))
235 {
236 if (!ecore_evas_avoid_damage_get(ecore_evas))
237 ecore_evas_avoid_damage_set(ecore_evas, 1);
238 else
239 ecore_evas_avoid_damage_set(ecore_evas, 0);
240 }
241 else if (!strcmp(ev->keyname, "s"))
242 {
243 if (!ecore_evas_shaped_get(ecore_evas))
244 {
245 ecore_evas_shaped_set(ecore_evas, 1);
246 evas_object_hide(o_bg);
247 }
248 else
249 {
250 ecore_evas_shaped_set(ecore_evas, 0);
251 evas_object_show(o_bg);
252 }
253 }
254 else if (!strcmp(ev->keyname, "b"))
255 {
256 if (!ecore_evas_borderless_get(ecore_evas))
257 ecore_evas_borderless_set(ecore_evas, 1);
258 else
259 ecore_evas_borderless_set(ecore_evas, 0);
260 }
261 else if (!strcmp(ev->keyname, "q"))
262 {
263 ecore_main_loop_quit();
264 while (video_objs)
265 {
266 printf("del obj!\n");
267 evas_object_del(video_objs->data);
268 video_objs = eina_list_remove_list(video_objs, video_objs);
269 printf("done\n");
270 }
271 }
272 else if (!strcmp(ev->keyname, "z"))
273 {
274 vis = (vis + 1) % EMOTION_VIS_LAST;
275 printf("new visualization: %d\n", vis);
276
277 EINA_LIST_FOREACH(video_objs, l, o)
278 {
279 Eina_Bool supported;
280
281 supported = emotion_object_vis_supported(o, vis);
282 if (supported)
283 emotion_object_vis_set(o, vis);
284 else
285 {
286 const char *file;
287
288 file = emotion_object_file_get(o);
289 printf("object %p (%s) does not support visualization %d\n",
290 o, file, vis);
291 }
292 }
293 }
294 else
295 {
296 printf("UNHANDLED: %s\n", ev->keyname);
297 }
298}
299
300static void
301video_obj_time_changed(Evas_Object *obj, Evas_Object *edje)
302{
303 double pos, len, scale;
304 char buf[256];
305 int ph, pm, ps, pf, lh, lm, ls;
306
307 pos = emotion_object_position_get(obj);
308 len = emotion_object_play_length_get(obj);
309 scale = (len > 0.0) ? pos / len : 0.0;
310 edje_object_part_drag_value_set(edje, "video_progress", scale, 0.0);
311 lh = len / 3600;
312 lm = len / 60 - (lh * 60);
313 ls = len - (lm * 60);
314 ph = pos / 3600;
315 pm = pos / 60 - (ph * 60);
316 ps = pos - (pm * 60);
317 pf = pos * 100 - (ps * 100) - (pm * 60 * 100) - (ph * 60 * 60 * 100);
318 snprintf(buf, sizeof(buf), "%i:%02i:%02i.%02i / %i:%02i:%02i",
319 ph, pm, ps, pf, lh, lm, ls);
320 edje_object_part_text_set(edje, "video_progress_txt", buf);
321}
322
323static void
324video_obj_frame_decode_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
325{
326 video_obj_time_changed(obj, data);
327
328 if (0)
329 {
330 double t;
331 static double pt = 0.0;
332 t = ecore_time_get();
333 printf("FPS: %3.3f\n", 1.0 / (t - pt));
334 pt = t;
335 }
336}
337
338static void
339video_obj_frame_resize_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
340{
341 Evas_Object *oe;
342 int iw, ih;
343 Evas_Coord w, h;
344 double ratio;
345
346 oe = data;
347 emotion_object_size_get(obj, &iw, &ih);
348 ratio = emotion_object_ratio_get(obj);
349 printf("HANDLE %ix%i @ %3.3f\n", iw, ih, ratio);
350 if (ratio > 0.0) iw = (ih * ratio) + 0.5;
351 edje_extern_object_min_size_set(obj, iw, ih);
352 edje_object_part_swallow(oe, "video_swallow", obj);
353 edje_object_size_min_calc(oe, &w, &h);
354 evas_object_resize(oe, w, h);
355 edje_extern_object_min_size_set(obj, 0, 0);
356 edje_object_part_swallow(oe, "video_swallow", obj);
357}
358
359static void
360video_obj_length_change_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
361{
362 video_obj_time_changed(obj, data);
363}
364
365static void
366video_obj_position_update_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
367{
368 video_obj_time_changed(obj, data);
369}
370
371static void
372video_obj_stopped_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
373{
374 printf("video stopped!\n");
375 emotion_object_position_set(obj, 0.0);
376 emotion_object_play_set(obj, 1);
377}
378
379static void
380video_obj_channels_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
381{
382 printf("channels changed: [AUD %i][VID %i][SPU %i]\n",
383 emotion_object_audio_channel_count(obj),
384 emotion_object_video_channel_count(obj),
385 emotion_object_spu_channel_count(obj));
386}
387
388static void
389video_obj_title_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
390{
391 printf("video title to: \"%s\"\n", emotion_object_title_get(obj));
392}
393
394static void
395video_obj_progress_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
396{
397 printf("progress: \"%s\" %3.3f\n",
398 emotion_object_progress_info_get(obj),
399 emotion_object_progress_status_get(obj));
400}
401
402static void
403video_obj_ref_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
404{
405 printf("video ref to: \"%s\" %i\n",
406 emotion_object_ref_file_get(obj),
407 emotion_object_ref_num_get(obj));
408}
409
410static void
411video_obj_button_num_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
412{
413 printf("video spu buttons to: %i\n",
414 emotion_object_spu_button_count_get(obj));
415}
416
417static void
418video_obj_button_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
419{
420 printf("video selected spu button: %i\n",
421 emotion_object_spu_button_get(obj));
422}
423
424
425
426static void
427video_obj_signal_play_cb(void *data, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
428{
429 Evas_Object *ov = data;
430 emotion_object_play_set(ov, 1);
431 edje_object_signal_emit(o, "video_state", "play");
432}
433
434static void
435video_obj_signal_pause_cb(void *data, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
436{
437 Evas_Object *ov = data;
438 emotion_object_play_set(ov, 0);
439 edje_object_signal_emit(o, "video_state", "pause");
440}
441
442static void
443video_obj_signal_stop_cb(void *data, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
444{
445 Evas_Object *ov = data;
446 emotion_object_play_set(ov, 0);
447 emotion_object_position_set(ov, 0);
448 edje_object_signal_emit(o, "video_state", "stop");
449}
450
451static void
452video_obj_signal_jump_cb(void *data, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
453{
454 Evas_Object *ov = data;
455 double len;
456 double x, y;
457
458 edje_object_part_drag_value_get(o, source, &x, &y);
459 len = emotion_object_play_length_get(ov);
460 emotion_object_position_set(ov, x * len);
461}
462
463static void
464video_obj_signal_speed_cb(void *data, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
465{
466 Evas_Object *ov = data;
467 double spd;
468 double x, y;
469 char buf[256];
470
471 edje_object_part_drag_value_get(o, source, &x, &y);
472 spd = 255 * y;
473 evas_object_color_set(ov, spd, spd, spd, spd);
474 snprintf(buf, sizeof(buf), "%.0f", spd);
475 edje_object_part_text_set(o, "video_speed_txt", buf);
476}
477
478static void
479video_obj_signal_frame_move_start_cb(void *data EINA_UNUSED, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
480{
481 Frame_Data *fd;
482 Evas_Coord x, y;
483
484 fd = evas_object_data_get(o, "frame_data");
485 fd->moving = 1;
486 evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
487 fd->x = x;
488 fd->y = y;
489 evas_object_raise(o);
490}
491
492static void
493video_obj_signal_frame_move_stop_cb(void *data EINA_UNUSED, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
494{
495 Frame_Data *fd;
496
497 fd = evas_object_data_get(o, "frame_data");
498 fd->moving = 0;
499}
500
501static void
502video_obj_signal_frame_resize_start_cb(void *data EINA_UNUSED, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
503{
504 Frame_Data *fd;
505 Evas_Coord x, y;
506
507 fd = evas_object_data_get(o, "frame_data");
508 fd->resizing = 1;
509 evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
510 fd->x = x;
511 fd->y = y;
512 evas_object_raise(o);
513}
514
515static void
516video_obj_signal_frame_resize_stop_cb(void *data EINA_UNUSED, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
517{
518 Frame_Data *fd;
519
520 fd = evas_object_data_get(o, "frame_data");
521 fd->resizing = 0;
522}
523
524static void
525video_obj_signal_frame_move_cb(void *data EINA_UNUSED, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
526{
527 Frame_Data *fd;
528
529 fd = evas_object_data_get(o, "frame_data");
530 if (fd->moving)
531 {
532 Evas_Coord x, y, ox, oy;
533
534 evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
535 evas_object_geometry_get(o, &ox, &oy, NULL, NULL);
536 evas_object_move(o, ox + (x - fd->x), oy + (y - fd->y));
537 fd->x = x;
538 fd->y = y;
539 }
540 else if (fd->resizing)
541 {
542 Evas_Coord x, y, ow, oh;
543
544 evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
545 evas_object_geometry_get(o, NULL, NULL, &ow, &oh);
546 evas_object_resize(o, ow + (x - fd->x), oh + (y - fd->y));
547 fd->x = x;
548 fd->y = y;
549 }
550}
551
552
553static void
554init_video_object(const char *module_filename, const char *filename)
555{
556 Evas_Object *o, *oe;
557 int iw, ih;
558 Evas_Coord w, h;
559 Frame_Data *fd;
560
561
562/* basic video object setup */
563 o = emotion_object_add(evas);
564 if (!emotion_object_init(o, module_filename))
565 return;
566 emotion_object_vis_set(o, vis);
567 if (!emotion_object_file_set(o, filename))
568 {
569 return;
570 }
571 emotion_object_last_position_load(o);
572 emotion_object_play_set(o, 1);
573 evas_object_move(o, 0, 0);
574 evas_object_resize(o, 320, 240);
575 emotion_object_smooth_scale_set(o, 1);
576 evas_object_show(o);
577/* end basic video setup. all the rest here is just to be fancy */
578
579
580 video_objs = eina_list_append(video_objs, o);
581
582 emotion_object_size_get(o, &iw, &ih);
583 w = iw; h = ih;
584
585 fd = calloc(1, sizeof(Frame_Data));
586
587 oe = edje_object_add(evas);
588 evas_object_data_set(oe, "frame_data", fd);
589 if (reflex)
590 edje_object_file_set(oe, PACKAGE_DATA_DIR"/data/theme.edj", "video_controller/reflex");
591 else
592 edje_object_file_set(oe, PACKAGE_DATA_DIR"/data/theme.edj", "video_controller");
593 edje_extern_object_min_size_set(o, w, h);
594 edje_object_part_swallow(oe, "video_swallow", o);
595 edje_object_size_min_calc(oe, &w, &h);
596// evas_object_move(oe, rand() % (int)(startw - w), rand() % (int)(starth - h));
597 evas_object_move(oe, 0, 0);
598 evas_object_resize(oe, w, h);
599 edje_extern_object_min_size_set(o, 0, 0);
600 edje_object_part_swallow(oe, "video_swallow", o);
601
602 evas_object_smart_callback_add(o, "frame_decode", video_obj_frame_decode_cb, oe);
603 evas_object_smart_callback_add(o, "frame_resize", video_obj_frame_resize_cb, oe);
604 evas_object_smart_callback_add(o, "length_change", video_obj_length_change_cb, oe);
605 evas_object_smart_callback_add(o, "position_update", video_obj_position_update_cb, oe);
606
607 evas_object_smart_callback_add(o, "decode_stop", video_obj_stopped_cb, oe);
608 evas_object_smart_callback_add(o, "channels_change", video_obj_channels_cb, oe);
609 evas_object_smart_callback_add(o, "title_change", video_obj_title_cb, oe);
610 evas_object_smart_callback_add(o, "progress_change", video_obj_progress_cb, oe);
611 evas_object_smart_callback_add(o, "ref_change", video_obj_ref_cb, oe);
612 evas_object_smart_callback_add(o, "button_num_change", video_obj_button_num_cb, oe);
613 evas_object_smart_callback_add(o, "button_change", video_obj_button_cb, oe);
614
615 edje_object_signal_callback_add(oe, "video_control", "play", video_obj_signal_play_cb, o);
616 edje_object_signal_callback_add(oe, "video_control", "pause", video_obj_signal_pause_cb, o);
617 edje_object_signal_callback_add(oe, "video_control", "stop", video_obj_signal_stop_cb, o);
618 edje_object_signal_callback_add(oe, "drag", "video_progress", video_obj_signal_jump_cb, o);
619 edje_object_signal_callback_add(oe, "drag", "video_speed", video_obj_signal_speed_cb, o);
620
621 edje_object_signal_callback_add(oe, "frame_move", "start", video_obj_signal_frame_move_start_cb, oe);
622 edje_object_signal_callback_add(oe, "frame_move", "stop", video_obj_signal_frame_move_stop_cb, oe);
623 edje_object_signal_callback_add(oe, "frame_resize", "start", video_obj_signal_frame_resize_start_cb, oe);
624 edje_object_signal_callback_add(oe, "frame_resize", "stop", video_obj_signal_frame_resize_stop_cb, oe);
625 edje_object_signal_callback_add(oe, "mouse,move", "*", video_obj_signal_frame_move_cb, oe);
626
627 edje_object_part_drag_value_set(oe, "video_speed", 0.0, 1.0);
628 edje_object_part_text_set(oe, "video_speed_txt", "1.0");
629
630 edje_object_signal_emit(o, "video_state", "play");
631
632 evas_object_show(oe);
633}
634
635static Eina_Bool
636check_positions(void *data EINA_UNUSED)
637{
638 const Eina_List *lst;
639 Evas_Object *o;
640
641 EINA_LIST_FOREACH(video_objs, lst, o)
642 video_obj_time_changed(o, evas_object_smart_parent_get(o));
643
644 return !!video_objs;
645}
646
647int
648main(int argc, char **argv)
649{
650 int args;
651 Eina_Rectangle geometry = {0, 0, startw, starth};
652 char *engine = NULL;
653 char *backend = NULL;
654 int verbose = 0;
655 int visual = EMOTION_VIS_NONE;
656 unsigned char help = 0;
657 unsigned char engines_listed = 0;
658 Ecore_Getopt_Value values[] = {
659 ECORE_GETOPT_VALUE_STR(engine),
660 ECORE_GETOPT_VALUE_BOOL(engines_listed),
661 ECORE_GETOPT_VALUE_PTR_CAST(geometry),
662 ECORE_GETOPT_VALUE_STR(backend),
663 ECORE_GETOPT_VALUE_INT(visual),
664 ECORE_GETOPT_VALUE_INT(verbose),
665 ECORE_GETOPT_VALUE_BOOL(reflex),
666 ECORE_GETOPT_VALUE_NONE,
667 ECORE_GETOPT_VALUE_NONE,
668 ECORE_GETOPT_VALUE_NONE,
669 ECORE_GETOPT_VALUE_BOOL(help),
670 ECORE_GETOPT_VALUE_NONE
671 };
672
673
674 if (!ecore_evas_init())
675 return -1;
676 if (!edje_init())
677 goto shutdown_ecore_evas;
678
679 start_time = ecore_time_get();
680 ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, main_signal_exit, NULL);
681 edje_frametime_set(1.0 / 30.0);
682
683 ecore_app_args_set(argc, (const char **)argv);
684 args = ecore_getopt_parse(&options, values, argc, argv);
685 if (args < 0) goto shutdown_edje;
686 else if (help) goto shutdown_edje;
687 else if (engines_listed) goto shutdown_edje;
688 else if (args == argc)
689 {
690 printf("must provide at least one file to play!\n");
691 goto shutdown_edje;
692 }
693
694 if ((geometry.w == 0) || (geometry.h == 0))
695 {
696 if (geometry.w == 0) geometry.w = 320;
697 if (geometry.h == 0) geometry.h = 240;
698 }
699
700 printf("evas engine: %s\n", engine ? engine : "<auto>");
701 printf("emotion backend: %s\n", backend ? backend : "<auto>");
702 printf("vis: %d\n", vis);
703 printf("geometry: %d %d %dx%d\n", geometry.x, geometry.y, geometry.w, geometry.h);
704
705 ecore_evas = ecore_evas_new
706 (engine, geometry.x, geometry.y, geometry.w, geometry.h, NULL);
707 if (!ecore_evas)
708 goto shutdown_edje;
709
710// ecore_evas_alpha_set(ecore_evas, EINA_TRUE);
711
712 ecore_evas_callback_delete_request_set(ecore_evas, main_delete_request);
713 ecore_evas_callback_resize_set(ecore_evas, main_resize);
714 ecore_evas_title_set(ecore_evas, "Evas Media Test Program");
715 ecore_evas_name_class_set(ecore_evas, "evas_media_test", "main");
716 ecore_evas_show(ecore_evas);
717 evas = ecore_evas_get(ecore_evas);
718 evas_image_cache_set(evas, 8 * 1024 * 1024);
719 evas_font_cache_set(evas, 1 * 1024 * 1024);
720 evas_font_path_append(evas, PACKAGE_DATA_DIR"/data/fonts");
721
722 emotion_init();
723
724 bg_setup();
725
726 for (; args < argc; args++)
727 init_video_object(backend, argv[args]);
728
729 ecore_animator_add(check_positions, NULL);
730
731 ecore_main_loop_begin();
732
733 main_signal_exit(NULL, 0, NULL);
734
735 emotion_shutdown();
736 ecore_evas_free(ecore_evas);
737 ecore_evas_shutdown();
738 edje_shutdown();
739
740 return 0;
741
742 shutdown_edje:
743 edje_shutdown();
744 shutdown_ecore_evas:
745 ecore_evas_shutdown();
746
747 return -1;
748}