summaryrefslogtreecommitdiff
path: root/src/tests/emotion
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-02-29 10:18:40 +0000
committerTom Hacohen <tom@stosb.com>2016-02-29 11:33:27 +0000
commite71e6561eeb5f0a10e5b08e44d2977e58bfd682b (patch)
tree72b41e7f6740360d265bbda572da5eb236c2e957 /src/tests/emotion
parent56ea371dfb064c28906c7d8344b0c0e03c1d3d4d (diff)
Eo callbacks: Migrate all of the EFL to the new event cb signatures.
Diffstat (limited to 'src/tests/emotion')
-rw-r--r--src/tests/emotion/emotion_test_main-eo.c86
1 files changed, 36 insertions, 50 deletions
diff --git a/src/tests/emotion/emotion_test_main-eo.c b/src/tests/emotion/emotion_test_main-eo.c
index efa9d3c8ea..4efbfc988b 100644
--- a/src/tests/emotion/emotion_test_main-eo.c
+++ b/src/tests/emotion/emotion_test_main-eo.c
@@ -56,8 +56,7 @@ struct _Frame_Data
56 Evas_Coord x, y; 56 Evas_Coord x, y;
57}; 57};
58 58
59static Eina_Bool bg_key_down(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, 59static Eina_Bool bg_key_down(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED);
60 const Eo_Event_Description *desc EINA_UNUSED, void *event_info);
61 60
62 61
63static Evas_Object *o_bg = NULL; 62static Evas_Object *o_bg = NULL;
@@ -136,10 +135,9 @@ broadcast_event(Emotion_Event ev)
136} 135}
137 136
138static Eina_Bool 137static Eina_Bool
139bg_key_down(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, 138bg_key_down(void *data EINA_UNUSED, const Eo_Event *event)
140 const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
141{ 139{
142 Evas_Event_Key_Down *ev = event_info; 140 Evas_Event_Key_Down *ev = event->event_info;
143 Eina_List *l; 141 Eina_List *l;
144 Evas_Object *o; 142 Evas_Object *o;
145 143
@@ -295,8 +293,7 @@ bg_key_down(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
295} 293}
296 294
297static Eina_Bool 295static Eina_Bool
298_oe_free_cb(void *data, 296_oe_free_cb(void *data, const Eo_Event *event EINA_UNUSED)
299 Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
300{ 297{
301 free(data); 298 free(data);
302 return EINA_TRUE; 299 return EINA_TRUE;
@@ -330,10 +327,9 @@ video_obj_time_changed(Evas_Object *obj, Evas_Object *edje)
330} 327}
331 328
332static Eina_Bool 329static Eina_Bool
333video_obj_frame_decode_cb(void *data, 330video_obj_frame_decode_cb(void *data, const Eo_Event *event)
334 Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
335{ 331{
336 video_obj_time_changed(obj, data); 332 video_obj_time_changed(event->obj, data);
337 333
338 if (0) 334 if (0)
339 { 335 {
@@ -347,8 +343,7 @@ video_obj_frame_decode_cb(void *data,
347} 343}
348 344
349static Eina_Bool 345static Eina_Bool
350video_obj_frame_resize_cb(void *data, 346video_obj_frame_resize_cb(void *data, const Eo_Event *event)
351 Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
352{ 347{
353 Evas_Object *oe; 348 Evas_Object *oe;
354 int iw, ih; 349 int iw, ih;
@@ -356,114 +351,105 @@ video_obj_frame_resize_cb(void *data,
356 double ratio; 351 double ratio;
357 352
358 oe = data; 353 oe = data;
359 emotion_object_size_get(obj, &iw, &ih); 354 emotion_object_size_get(event->obj, &iw, &ih);
360 ratio = emotion_object_ratio_get(obj); 355 ratio = emotion_object_ratio_get(event->obj);
361 printf("HANDLE %ix%i @ %3.3f\n", iw, ih, ratio); 356 printf("HANDLE %ix%i @ %3.3f\n", iw, ih, ratio);
362 if (ratio > 0.0) iw = (ih * ratio) + 0.5; 357 if (ratio > 0.0) iw = (ih * ratio) + 0.5;
363 evas_object_size_hint_min_set(obj, iw, ih); 358 evas_object_size_hint_min_set(event->obj, iw, ih);
364 eo_do(oe, edje_obj_part_swallow( "video_swallow", obj), 359 eo_do(oe, edje_obj_part_swallow( "video_swallow", event->obj),
365 edje_obj_size_min_calc(&w, &h), 360 edje_obj_size_min_calc(&w, &h),
366 efl_gfx_size_set(w, h) 361 efl_gfx_size_set(w, h)
367 ); 362 );
368 eo_do(obj, evas_obj_size_hint_min_set(0, 0)); 363 eo_do(event->obj, evas_obj_size_hint_min_set(0, 0));
369 eo_do(oe, edje_obj_part_swallow( "video_swallow", obj)); 364 eo_do(oe, edje_obj_part_swallow( "video_swallow", event->obj));
370 365
371 return EINA_TRUE; 366 return EINA_TRUE;
372} 367}
373 368
374static Eina_Bool 369static Eina_Bool
375video_obj_length_change_cb(void *data, 370video_obj_length_change_cb(void *data, const Eo_Event *event)
376 Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
377{ 371{
378 printf("len change!\n"); 372 printf("len change!\n");
379 video_obj_time_changed(obj, data); 373 video_obj_time_changed(event->obj, data);
380 374
381 return EINA_TRUE; 375 return EINA_TRUE;
382} 376}
383 377
384static Eina_Bool 378static Eina_Bool
385video_obj_position_update_cb(void *data, 379video_obj_position_update_cb(void *data, const Eo_Event *event)
386 Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
387{ 380{
388 printf("pos up!\n"); 381 printf("pos up!\n");
389 video_obj_time_changed(obj, data); 382 video_obj_time_changed(event->obj, data);
390 383
391 return EINA_TRUE; 384 return EINA_TRUE;
392} 385}
393 386
394static Eina_Bool 387static Eina_Bool
395video_obj_stopped_cb(void *data EINA_UNUSED, 388video_obj_stopped_cb(void *data EINA_UNUSED, const Eo_Event *event)
396 Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
397{ 389{
398 printf("video stopped!!!\n"); 390 printf("video stopped!!!\n");
399 if (loop) 391 if (loop)
400 { 392 {
401 emotion_object_position_set(obj, 0.0); 393 emotion_object_position_set(event->obj, 0.0);
402 emotion_object_play_set(obj, EINA_TRUE); 394 emotion_object_play_set(event->obj, EINA_TRUE);
403 } 395 }
404 396
405 return EINA_TRUE; 397 return EINA_TRUE;
406} 398}
407 399
408static Eina_Bool 400static Eina_Bool
409video_obj_channels_cb(void *data EINA_UNUSED, 401video_obj_channels_cb(void *data EINA_UNUSED, const Eo_Event *event)
410 Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
411{ 402{
412 printf("channels changed: [AUD %i][VID %i][SPU %i]\n", 403 printf("channels changed: [AUD %i][VID %i][SPU %i]\n",
413 emotion_object_audio_channel_count(obj), 404 emotion_object_audio_channel_count(event->obj),
414 emotion_object_video_channel_count(obj), 405 emotion_object_video_channel_count(event->obj),
415 emotion_object_spu_channel_count(obj)); 406 emotion_object_spu_channel_count(event->obj));
416 407
417 return EINA_TRUE; 408 return EINA_TRUE;
418} 409}
419 410
420static Eina_Bool 411static Eina_Bool
421 video_obj_title_cb(void *data EINA_UNUSED, 412 video_obj_title_cb(void *data EINA_UNUSED, const Eo_Event *event)
422 Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
423{ 413{
424 printf("video title to: \"%s\"\n", emotion_object_title_get(obj)); 414 printf("video title to: \"%s\"\n", emotion_object_title_get(event->obj));
425 415
426 return EINA_TRUE; 416 return EINA_TRUE;
427} 417}
428 418
429static Eina_Bool 419static Eina_Bool
430video_obj_progress_cb(void *data EINA_UNUSED, 420video_obj_progress_cb(void *data EINA_UNUSED, const Eo_Event *event)
431 Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
432{ 421{
433 printf("progress: \"%s\" %3.3f\n", 422 printf("progress: \"%s\" %3.3f\n",
434 emotion_object_progress_info_get(obj), 423 emotion_object_progress_info_get(event->obj),
435 emotion_object_progress_status_get(obj)); 424 emotion_object_progress_status_get(event->obj));
436 425
437 return EINA_TRUE; 426 return EINA_TRUE;
438} 427}
439 428
440static Eina_Bool 429static Eina_Bool
441video_obj_ref_cb(void *data EINA_UNUSED, 430video_obj_ref_cb(void *data EINA_UNUSED, const Eo_Event *event)
442 Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
443{ 431{
444 printf("video ref to: \"%s\" %i\n", 432 printf("video ref to: \"%s\" %i\n",
445 emotion_object_ref_file_get(obj), 433 emotion_object_ref_file_get(event->obj),
446 emotion_object_ref_num_get(obj)); 434 emotion_object_ref_num_get(event->obj));
447 435
448 return EINA_TRUE; 436 return EINA_TRUE;
449} 437}
450 438
451static Eina_Bool 439static Eina_Bool
452video_obj_button_num_cb(void *data EINA_UNUSED, 440video_obj_button_num_cb(void *data EINA_UNUSED, const Eo_Event *event)
453 Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
454{ 441{
455 printf("video spu buttons to: %i\n", 442 printf("video spu buttons to: %i\n",
456 emotion_object_spu_button_count_get(obj)); 443 emotion_object_spu_button_count_get(event->obj));
457 444
458 return EINA_TRUE; 445 return EINA_TRUE;
459} 446}
460 447
461static Eina_Bool 448static Eina_Bool
462video_obj_button_cb(void *data EINA_UNUSED, 449video_obj_button_cb(void *data EINA_UNUSED, const Eo_Event *event)
463 Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
464{ 450{
465 printf("video selected spu button: %i\n", 451 printf("video selected spu button: %i\n",
466 emotion_object_spu_button_get(obj)); 452 emotion_object_spu_button_get(event->obj));
467 453
468 return EINA_TRUE; 454 return EINA_TRUE;
469} 455}