summaryrefslogtreecommitdiff
path: root/src/tests/emotion
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-06-20 15:31:31 +0100
committerTom Hacohen <tom@stosb.com>2016-06-20 18:02:00 +0100
commit6202cc7485a54dea6f02a2668e7c907247902dd1 (patch)
tree7a1fa2b61175b1ef75a9bff7299a0ce3daa45216 /src/tests/emotion
parentd648eb5311585f7392d0290640ba133814b52589 (diff)
Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
Diffstat (limited to 'src/tests/emotion')
-rw-r--r--src/tests/emotion/emotion_test_main-eo.c54
1 files changed, 15 insertions, 39 deletions
diff --git a/src/tests/emotion/emotion_test_main-eo.c b/src/tests/emotion/emotion_test_main-eo.c
index 48b0535623..f8ed415acd 100644
--- a/src/tests/emotion/emotion_test_main-eo.c
+++ b/src/tests/emotion/emotion_test_main-eo.c
@@ -56,7 +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, const Eo_Event *event EINA_UNUSED); 59static void bg_key_down(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED);
60 60
61 61
62static Evas_Object *o_bg = NULL; 62static Evas_Object *o_bg = NULL;
@@ -131,7 +131,7 @@ broadcast_event(Emotion_Event ev)
131 emotion_object_event_simple_send(obj, ev); 131 emotion_object_event_simple_send(obj, ev);
132} 132}
133 133
134static Eina_Bool 134static void
135bg_key_down(void *data EINA_UNUSED, const Eo_Event *event) 135bg_key_down(void *data EINA_UNUSED, const Eo_Event *event)
136{ 136{
137 Efl_Event_Key *ev = event->info; 137 Efl_Event_Key *ev = event->info;
@@ -139,7 +139,7 @@ bg_key_down(void *data EINA_UNUSED, const Eo_Event *event)
139 Evas_Object *o; 139 Evas_Object *o;
140 const char *keyname = efl_event_key_name_get(ev); 140 const char *keyname = efl_event_key_name_get(ev);
141 141
142 if (!keyname) return EO_CALLBACK_CONTINUE; 142 if (!keyname) return;
143 143
144 if (!strcmp(keyname, "Escape")) 144 if (!strcmp(keyname, "Escape"))
145 ecore_main_loop_quit(); 145 ecore_main_loop_quit();
@@ -288,15 +288,12 @@ bg_key_down(void *data EINA_UNUSED, const Eo_Event *event)
288 { 288 {
289 printf("UNHANDLED: %s\n", keyname); 289 printf("UNHANDLED: %s\n", keyname);
290 } 290 }
291
292 return EINA_TRUE;
293} 291}
294 292
295static Eina_Bool 293static void
296_oe_free_cb(void *data, const Eo_Event *event EINA_UNUSED) 294_oe_free_cb(void *data, const Eo_Event *event EINA_UNUSED)
297{ 295{
298 free(data); 296 free(data);
299 return EINA_TRUE;
300} 297}
301 298
302static void 299static void
@@ -326,7 +323,7 @@ video_obj_time_changed(Evas_Object *obj, Evas_Object *edje)
326 edje_obj_part_text_set(edje, "video_progress_txt", buf); 323 edje_obj_part_text_set(edje, "video_progress_txt", buf);
327} 324}
328 325
329static Eina_Bool 326static void
330video_obj_frame_decode_cb(void *data, const Eo_Event *event) 327video_obj_frame_decode_cb(void *data, const Eo_Event *event)
331{ 328{
332 video_obj_time_changed(event->object, data); 329 video_obj_time_changed(event->object, data);
@@ -339,10 +336,9 @@ video_obj_frame_decode_cb(void *data, const Eo_Event *event)
339 printf("FPS: %3.3f\n", 1.0 / (t - pt)); 336 printf("FPS: %3.3f\n", 1.0 / (t - pt));
340 pt = t; 337 pt = t;
341 } 338 }
342 return EINA_TRUE;
343} 339}
344 340
345static Eina_Bool 341static void
346video_obj_frame_resize_cb(void *data, const Eo_Event *event) 342video_obj_frame_resize_cb(void *data, const Eo_Event *event)
347{ 343{
348 Evas_Object *oe; 344 Evas_Object *oe;
@@ -361,29 +357,23 @@ video_obj_frame_resize_cb(void *data, const Eo_Event *event)
361 efl_gfx_size_set(oe, w, h); 357 efl_gfx_size_set(oe, w, h);
362 evas_object_size_hint_min_set(event->object, 0, 0); 358 evas_object_size_hint_min_set(event->object, 0, 0);
363 edje_object_part_swallow(oe, "video_swallow", event->object); 359 edje_object_part_swallow(oe, "video_swallow", event->object);
364
365 return EINA_TRUE;
366} 360}
367 361
368static Eina_Bool 362static void
369video_obj_length_change_cb(void *data, const Eo_Event *event) 363video_obj_length_change_cb(void *data, const Eo_Event *event)
370{ 364{
371 printf("len change!\n"); 365 printf("len change!\n");
372 video_obj_time_changed(event->object, data); 366 video_obj_time_changed(event->object, data);
373
374 return EINA_TRUE;
375} 367}
376 368
377static Eina_Bool 369static void
378video_obj_position_update_cb(void *data, const Eo_Event *event) 370video_obj_position_update_cb(void *data, const Eo_Event *event)
379{ 371{
380 printf("pos up!\n"); 372 printf("pos up!\n");
381 video_obj_time_changed(event->object, data); 373 video_obj_time_changed(event->object, data);
382
383 return EINA_TRUE;
384} 374}
385 375
386static Eina_Bool 376static void
387video_obj_stopped_cb(void *data EINA_UNUSED, const Eo_Event *event) 377video_obj_stopped_cb(void *data EINA_UNUSED, const Eo_Event *event)
388{ 378{
389 printf("video stopped!!!\n"); 379 printf("video stopped!!!\n");
@@ -392,65 +382,51 @@ video_obj_stopped_cb(void *data EINA_UNUSED, const Eo_Event *event)
392 emotion_object_position_set(event->object, 0.0); 382 emotion_object_position_set(event->object, 0.0);
393 emotion_object_play_set(event->object, EINA_TRUE); 383 emotion_object_play_set(event->object, EINA_TRUE);
394 } 384 }
395
396 return EINA_TRUE;
397} 385}
398 386
399static Eina_Bool 387static void
400video_obj_channels_cb(void *data EINA_UNUSED, const Eo_Event *event) 388video_obj_channels_cb(void *data EINA_UNUSED, const Eo_Event *event)
401{ 389{
402 printf("channels changed: [AUD %i][VID %i][SPU %i]\n", 390 printf("channels changed: [AUD %i][VID %i][SPU %i]\n",
403 emotion_object_audio_channel_count(event->object), 391 emotion_object_audio_channel_count(event->object),
404 emotion_object_video_channel_count(event->object), 392 emotion_object_video_channel_count(event->object),
405 emotion_object_spu_channel_count(event->object)); 393 emotion_object_spu_channel_count(event->object));
406
407 return EINA_TRUE;
408} 394}
409 395
410static Eina_Bool 396static void
411 video_obj_title_cb(void *data EINA_UNUSED, const Eo_Event *event) 397 video_obj_title_cb(void *data EINA_UNUSED, const Eo_Event *event)
412{ 398{
413 printf("video title to: \"%s\"\n", emotion_object_title_get(event->object)); 399 printf("video title to: \"%s\"\n", emotion_object_title_get(event->object));
414
415 return EINA_TRUE;
416} 400}
417 401
418static Eina_Bool 402static void
419video_obj_progress_cb(void *data EINA_UNUSED, const Eo_Event *event) 403video_obj_progress_cb(void *data EINA_UNUSED, const Eo_Event *event)
420{ 404{
421 printf("progress: \"%s\" %3.3f\n", 405 printf("progress: \"%s\" %3.3f\n",
422 emotion_object_progress_info_get(event->object), 406 emotion_object_progress_info_get(event->object),
423 emotion_object_progress_status_get(event->object)); 407 emotion_object_progress_status_get(event->object));
424
425 return EINA_TRUE;
426} 408}
427 409
428static Eina_Bool 410static void
429video_obj_ref_cb(void *data EINA_UNUSED, const Eo_Event *event) 411video_obj_ref_cb(void *data EINA_UNUSED, const Eo_Event *event)
430{ 412{
431 printf("video ref to: \"%s\" %i\n", 413 printf("video ref to: \"%s\" %i\n",
432 emotion_object_ref_file_get(event->object), 414 emotion_object_ref_file_get(event->object),
433 emotion_object_ref_num_get(event->object)); 415 emotion_object_ref_num_get(event->object));
434
435 return EINA_TRUE;
436} 416}
437 417
438static Eina_Bool 418static void
439video_obj_button_num_cb(void *data EINA_UNUSED, const Eo_Event *event) 419video_obj_button_num_cb(void *data EINA_UNUSED, const Eo_Event *event)
440{ 420{
441 printf("video spu buttons to: %i\n", 421 printf("video spu buttons to: %i\n",
442 emotion_object_spu_button_count_get(event->object)); 422 emotion_object_spu_button_count_get(event->object));
443
444 return EINA_TRUE;
445} 423}
446 424
447static Eina_Bool 425static void
448video_obj_button_cb(void *data EINA_UNUSED, const Eo_Event *event) 426video_obj_button_cb(void *data EINA_UNUSED, const Eo_Event *event)
449{ 427{
450 printf("video selected spu button: %i\n", 428 printf("video selected spu button: %i\n",
451 emotion_object_spu_button_get(event->object)); 429 emotion_object_spu_button_get(event->object));
452
453 return EINA_TRUE;
454} 430}
455 431
456static void 432static void