summaryrefslogtreecommitdiff
path: root/src/tests/emotion
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2014-02-14 20:31:07 +0100
committerdavemds <dave@gurumeditation.it>2014-02-14 20:31:07 +0100
commit38e85d79f56212ef69d9fa683c8afbe8912201cf (patch)
tree1f97b3fd03126b5077177839dc0460de88c91ad7 /src/tests/emotion
parent136cf346e9bbf6d60e3fc9899f506de247d88188 (diff)
Emotion test: tabs--
Diffstat (limited to 'src/tests/emotion')
-rw-r--r--src/tests/emotion/emotion_test_main.c214
1 files changed, 107 insertions, 107 deletions
diff --git a/src/tests/emotion/emotion_test_main.c b/src/tests/emotion/emotion_test_main.c
index 1a9cb24a93..3f3ec667f3 100644
--- a/src/tests/emotion/emotion_test_main.c
+++ b/src/tests/emotion/emotion_test_main.c
@@ -88,8 +88,8 @@ main_signal_exit(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_
88 ecore_main_loop_quit(); 88 ecore_main_loop_quit();
89 EINA_LIST_FREE(video_objs, o) 89 EINA_LIST_FREE(video_objs, o)
90 { 90 {
91 emotion_object_last_position_save(o); 91 emotion_object_last_position_save(o);
92 evas_object_del(o); 92 evas_object_del(o);
93 } 93 }
94 return EINA_TRUE; 94 return EINA_TRUE;
95} 95}
@@ -213,120 +213,120 @@ bg_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
213 broadcast_event(EMOTION_EVENT_10); 213 broadcast_event(EMOTION_EVENT_10);
214 else if (!strcmp(ev->keyname, "bracketleft")) 214 else if (!strcmp(ev->keyname, "bracketleft"))
215 { 215 {
216 EINA_LIST_FOREACH(video_objs, l, o) 216 EINA_LIST_FOREACH(video_objs, l, o)
217 emotion_object_audio_volume_set(o, emotion_object_audio_volume_get(o) - 0.1); 217 emotion_object_audio_volume_set(o, emotion_object_audio_volume_get(o) - 0.1);
218 } 218 }
219 else if (!strcmp(ev->keyname, "bracketright")) 219 else if (!strcmp(ev->keyname, "bracketright"))
220 { 220 {
221 EINA_LIST_FOREACH(video_objs, l, o) 221 EINA_LIST_FOREACH(video_objs, l, o)
222 emotion_object_audio_volume_set(o, emotion_object_audio_volume_get(o) + 0.1); 222 emotion_object_audio_volume_set(o, emotion_object_audio_volume_get(o) + 0.1);
223 } 223 }
224 else if (!strcmp(ev->keyname, "v")) 224 else if (!strcmp(ev->keyname, "v"))
225 { 225 {
226 EINA_LIST_FOREACH(video_objs, l, o) 226 EINA_LIST_FOREACH(video_objs, l, o)
227 { 227 {
228 if (emotion_object_video_mute_get(o)) 228 if (emotion_object_video_mute_get(o))
229 emotion_object_video_mute_set(o, 0); 229 emotion_object_video_mute_set(o, 0);
230 else 230 else
231 emotion_object_video_mute_set(o, 1); 231 emotion_object_video_mute_set(o, 1);
232 } 232 }
233 } 233 }
234 else if (!strcmp(ev->keyname, "a")) 234 else if (!strcmp(ev->keyname, "a"))
235 { 235 {
236 EINA_LIST_FOREACH(video_objs, l, o) 236 EINA_LIST_FOREACH(video_objs, l, o)
237 { 237 {
238 if (emotion_object_audio_mute_get(o)) 238 if (emotion_object_audio_mute_get(o))
239 { 239 {
240 emotion_object_audio_mute_set(o, 0); 240 emotion_object_audio_mute_set(o, 0);
241 printf("unmute\n"); 241 printf("unmute\n");
242 } 242 }
243 else 243 else
244 { 244 {
245 emotion_object_audio_mute_set(o, 1); 245 emotion_object_audio_mute_set(o, 1);
246 printf("mute\n"); 246 printf("mute\n");
247 } 247 }
248 } 248 }
249 } 249 }
250 else if (!strcmp(ev->keyname, "i")) 250 else if (!strcmp(ev->keyname, "i"))
251 { 251 {
252 EINA_LIST_FOREACH(video_objs, l, o) 252 EINA_LIST_FOREACH(video_objs, l, o)
253 { 253 {
254 printf("audio channels: %i\n", emotion_object_audio_channel_count(o)); 254 printf("audio channels: %i\n", emotion_object_audio_channel_count(o));
255 printf("video channels: %i\n", emotion_object_video_channel_count(o)); 255 printf("video channels: %i\n", emotion_object_video_channel_count(o));
256 printf("spu channels: %i\n", emotion_object_spu_channel_count(o)); 256 printf("spu channels: %i\n", emotion_object_spu_channel_count(o));
257 printf("seekable: %i\n", emotion_object_seekable_get(o)); 257 printf("seekable: %i\n", emotion_object_seekable_get(o));
258 } 258 }
259 } 259 }
260 else if (!strcmp(ev->keyname, "f")) 260 else if (!strcmp(ev->keyname, "f"))
261 { 261 {
262 if (!ecore_evas_fullscreen_get(ecore_evas)) 262 if (!ecore_evas_fullscreen_get(ecore_evas))
263 ecore_evas_fullscreen_set(ecore_evas, 1); 263 ecore_evas_fullscreen_set(ecore_evas, 1);
264 else 264 else
265 ecore_evas_fullscreen_set(ecore_evas, 0); 265 ecore_evas_fullscreen_set(ecore_evas, 0);
266 } 266 }
267 else if (!strcmp(ev->keyname, "d")) 267 else if (!strcmp(ev->keyname, "d"))
268 { 268 {
269 if (!ecore_evas_avoid_damage_get(ecore_evas)) 269 if (!ecore_evas_avoid_damage_get(ecore_evas))
270 ecore_evas_avoid_damage_set(ecore_evas, 1); 270 ecore_evas_avoid_damage_set(ecore_evas, 1);
271 else 271 else
272 ecore_evas_avoid_damage_set(ecore_evas, 0); 272 ecore_evas_avoid_damage_set(ecore_evas, 0);
273 } 273 }
274 else if (!strcmp(ev->keyname, "s")) 274 else if (!strcmp(ev->keyname, "s"))
275 { 275 {
276 if (!ecore_evas_shaped_get(ecore_evas)) 276 if (!ecore_evas_shaped_get(ecore_evas))
277 { 277 {
278 ecore_evas_shaped_set(ecore_evas, 1); 278 ecore_evas_shaped_set(ecore_evas, 1);
279 evas_object_hide(o_bg); 279 evas_object_hide(o_bg);
280 } 280 }
281 else 281 else
282 { 282 {
283 ecore_evas_shaped_set(ecore_evas, 0); 283 ecore_evas_shaped_set(ecore_evas, 0);
284 evas_object_show(o_bg); 284 evas_object_show(o_bg);
285 } 285 }
286 } 286 }
287 else if (!strcmp(ev->keyname, "b")) 287 else if (!strcmp(ev->keyname, "b"))
288 { 288 {
289 if (!ecore_evas_borderless_get(ecore_evas)) 289 if (!ecore_evas_borderless_get(ecore_evas))
290 ecore_evas_borderless_set(ecore_evas, 1); 290 ecore_evas_borderless_set(ecore_evas, 1);
291 else 291 else
292 ecore_evas_borderless_set(ecore_evas, 0); 292 ecore_evas_borderless_set(ecore_evas, 0);
293 } 293 }
294 else if (!strcmp(ev->keyname, "q")) 294 else if (!strcmp(ev->keyname, "q"))
295 { 295 {
296 ecore_main_loop_quit(); 296 ecore_main_loop_quit();
297 while (video_objs) 297 while (video_objs)
298 { 298 {
299 printf("del obj!\n"); 299 printf("del obj!\n");
300 evas_object_del(video_objs->data); 300 evas_object_del(video_objs->data);
301 video_objs = eina_list_remove_list(video_objs, video_objs); 301 video_objs = eina_list_remove_list(video_objs, video_objs);
302 printf("done\n"); 302 printf("done\n");
303 } 303 }
304 } 304 }
305 else if (!strcmp(ev->keyname, "z")) 305 else if (!strcmp(ev->keyname, "z"))
306 { 306 {
307 vis = (vis + 1) % EMOTION_VIS_LAST; 307 vis = (vis + 1) % EMOTION_VIS_LAST;
308 printf("new visualization: %d\n", vis); 308 printf("new visualization: %d\n", vis);
309 309
310 EINA_LIST_FOREACH(video_objs, l, o) 310 EINA_LIST_FOREACH(video_objs, l, o)
311 { 311 {
312 Eina_Bool supported; 312 Eina_Bool supported;
313 313
314 supported = emotion_object_vis_supported(o, vis); 314 supported = emotion_object_vis_supported(o, vis);
315 if (supported) 315 if (supported)
316 emotion_object_vis_set(o, vis); 316 emotion_object_vis_set(o, vis);
317 else 317 else
318 { 318 {
319 const char *file; 319 const char *file;
320 320
321 file = emotion_object_file_get(o); 321 file = emotion_object_file_get(o);
322 printf("object %p (%s) does not support visualization %d\n", 322 printf("object %p (%s) does not support visualization %d\n",
323 o, file, vis); 323 o, file, vis);
324 } 324 }
325 } 325 }
326 } 326 }
327 else 327 else
328 { 328 {
329 printf("UNHANDLED: %s\n", ev->keyname); 329 printf("UNHANDLED: %s\n", ev->keyname);
330 } 330 }
331} 331}
332 332
@@ -356,7 +356,7 @@ video_obj_time_changed(Evas_Object *obj, Evas_Object *edje)
356 ps = pos - (pm * 60); 356 ps = pos - (pm * 60);
357 pf = pos * 100 - (ps * 100) - (pm * 60 * 100) - (ph * 60 * 60 * 100); 357 pf = pos * 100 - (ps * 100) - (pm * 60 * 100) - (ph * 60 * 60 * 100);
358 snprintf(buf, sizeof(buf), "%i:%02i:%02i.%02i / %i:%02i:%02i", 358 snprintf(buf, sizeof(buf), "%i:%02i:%02i.%02i / %i:%02i:%02i",
359 ph, pm, ps, pf, lh, lm, ls); 359 ph, pm, ps, pf, lh, lm, ls);
360 edje_object_part_text_set(edje, "video_progress_txt", buf); 360 edje_object_part_text_set(edje, "video_progress_txt", buf);
361} 361}
362 362
@@ -367,11 +367,11 @@ video_obj_frame_decode_cb(void *data, Evas_Object *obj, void *event_info EINA_UN
367 367
368 if (0) 368 if (0)
369 { 369 {
370 double t; 370 double t;
371 static double pt = 0.0; 371 static double pt = 0.0;
372 t = ecore_time_get(); 372 t = ecore_time_get();
373 printf("FPS: %3.3f\n", 1.0 / (t - pt)); 373 printf("FPS: %3.3f\n", 1.0 / (t - pt));
374 pt = t; 374 pt = t;
375 } 375 }
376} 376}
377 377
@@ -420,9 +420,9 @@ static void
420video_obj_channels_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) 420video_obj_channels_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
421{ 421{
422 printf("channels changed: [AUD %i][VID %i][SPU %i]\n", 422 printf("channels changed: [AUD %i][VID %i][SPU %i]\n",
423 emotion_object_audio_channel_count(obj), 423 emotion_object_audio_channel_count(obj),
424 emotion_object_video_channel_count(obj), 424 emotion_object_video_channel_count(obj),
425 emotion_object_spu_channel_count(obj)); 425 emotion_object_spu_channel_count(obj));
426} 426}
427 427
428static void 428static void
@@ -435,30 +435,30 @@ static void
435video_obj_progress_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) 435video_obj_progress_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
436{ 436{
437 printf("progress: \"%s\" %3.3f\n", 437 printf("progress: \"%s\" %3.3f\n",
438 emotion_object_progress_info_get(obj), 438 emotion_object_progress_info_get(obj),
439 emotion_object_progress_status_get(obj)); 439 emotion_object_progress_status_get(obj));
440} 440}
441 441
442static void 442static void
443video_obj_ref_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) 443video_obj_ref_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
444{ 444{
445 printf("video ref to: \"%s\" %i\n", 445 printf("video ref to: \"%s\" %i\n",
446 emotion_object_ref_file_get(obj), 446 emotion_object_ref_file_get(obj),
447 emotion_object_ref_num_get(obj)); 447 emotion_object_ref_num_get(obj));
448} 448}
449 449
450static void 450static void
451video_obj_button_num_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) 451video_obj_button_num_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
452{ 452{
453 printf("video spu buttons to: %i\n", 453 printf("video spu buttons to: %i\n",
454 emotion_object_spu_button_count_get(obj)); 454 emotion_object_spu_button_count_get(obj));
455} 455}
456 456
457static void 457static void
458video_obj_button_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) 458video_obj_button_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
459{ 459{
460 printf("video selected spu button: %i\n", 460 printf("video selected spu button: %i\n",
461 emotion_object_spu_button_get(obj)); 461 emotion_object_spu_button_get(obj));
462} 462}
463 463
464 464
@@ -569,23 +569,23 @@ video_obj_signal_frame_move_cb(void *data EINA_UNUSED, Evas_Object *o, const cha
569 fd = evas_object_data_get(o, "frame_data"); 569 fd = evas_object_data_get(o, "frame_data");
570 if (fd->moving) 570 if (fd->moving)
571 { 571 {
572 Evas_Coord x, y, ox, oy; 572 Evas_Coord x, y, ox, oy;
573 573
574 evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y); 574 evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
575 evas_object_geometry_get(o, &ox, &oy, NULL, NULL); 575 evas_object_geometry_get(o, &ox, &oy, NULL, NULL);
576 evas_object_move(o, ox + (x - fd->x), oy + (y - fd->y)); 576 evas_object_move(o, ox + (x - fd->x), oy + (y - fd->y));
577 fd->x = x; 577 fd->x = x;
578 fd->y = y; 578 fd->y = y;
579 } 579 }
580 else if (fd->resizing) 580 else if (fd->resizing)
581 { 581 {
582 Evas_Coord x, y, ow, oh; 582 Evas_Coord x, y, ow, oh;
583 583
584 evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y); 584 evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
585 evas_object_geometry_get(o, NULL, NULL, &ow, &oh); 585 evas_object_geometry_get(o, NULL, NULL, &ow, &oh);
586 evas_object_resize(o, ow + (x - fd->x), oh + (y - fd->y)); 586 evas_object_resize(o, ow + (x - fd->x), oh + (y - fd->y));
587 fd->x = x; 587 fd->x = x;
588 fd->y = y; 588 fd->y = y;
589 } 589 }
590} 590}
591 591