From 15646cf5e639bdd4309a2b215f394436f652d2d1 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Fri, 11 Mar 2016 12:24:05 +0000 Subject: [PATCH] Revert "Fix examples according to the recent eo event changes." This reverts commit d2fba6c5959f82f35984167131d3b67207780f48. --- src/examples/eldbus/dbusmodel.c | 22 +++++++----- src/examples/emotion/emotion_basic_example.c | 3 +- src/examples/emotion/emotion_border_example.c | 28 ++++++++++------ src/examples/emotion/emotion_generic_example.c | 30 ++++++++++------- .../emotion/emotion_generic_subtitle_example.c | 3 +- src/examples/emotion/emotion_signals_example.c | 39 +++++++++++++--------- 6 files changed, 75 insertions(+), 50 deletions(-) diff --git a/src/examples/eldbus/dbusmodel.c b/src/examples/eldbus/dbusmodel.c index ec37309..3e4063e 100644 --- a/src/examples/eldbus/dbusmodel.c +++ b/src/examples/eldbus/dbusmodel.c @@ -14,9 +14,11 @@ static unsigned int children_count = 0; static Eina_Bool -_event_interface_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event) +_event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model, + const Eo_Event_Description *desc EINA_UNUSED, + void *event_info) { - Efl_Model_Load *actual_load = (Efl_Model_Load*)event->event_info; + Efl_Model_Load *actual_load = (Efl_Model_Load*)event_info; Eina_Array *properties_list; Eina_Array_Iterator iterator; Eina_Value const* property_value; @@ -27,8 +29,8 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event) if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status) return EINA_TRUE; - name = eldbus_model_proxy_name_get(event->obj); - efl_model_properties_get(event->obj, &properties_list); + name = eldbus_model_proxy_name_get(model); + efl_model_properties_get(model, &properties_list); printf(" -> %s\n", name); if (eina_array_count(properties_list)) @@ -36,7 +38,7 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event) EINA_ARRAY_ITER_NEXT(properties_list, i, property, iterator) { - efl_model_property_get(event->obj, property, &property_value); + efl_model_property_get(model, property, &property_value); if (property_value) { prop_str = eina_value_to_string(property_value); @@ -55,9 +57,11 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event) } static Eina_Bool -_event_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event) +_event_load_status_cb(void *data EINA_UNUSED, Eo *model, + const Eo_Event_Description *desc EINA_UNUSED, + void *event_info) { - Efl_Model_Load *actual_load = (Efl_Model_Load*)event->event_info; + Efl_Model_Load *actual_load = (Efl_Model_Load*)event_info; Eina_Accessor *accessor; Eo *child = NULL; unsigned int i; @@ -65,7 +69,7 @@ _event_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event) if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status) return EINA_TRUE; - efl_model_children_count_get(event->obj, &children_count); + efl_model_children_count_get(model, &children_count); if (children_count == 0) { printf("Don't find Interfaces\n"); @@ -73,7 +77,7 @@ _event_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event) return EINA_FALSE; } - efl_model_children_slice_get(event->obj, 0, 0, &accessor); + efl_model_children_slice_get(model, 0, 0, &accessor); printf("\nInterfaces:\n"); EINA_ACCESSOR_FOREACH(accessor, i, child) { diff --git a/src/examples/emotion/emotion_basic_example.c b/src/examples/emotion/emotion_basic_example.c index 9ad3575..9675f6b 100644 --- a/src/examples/emotion/emotion_basic_example.c +++ b/src/examples/emotion/emotion_basic_example.c @@ -15,7 +15,8 @@ #define HEIGHT (240) static Eina_Bool -_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) +_playback_started_cb(void *data EINA_UNUSED, + Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { printf("Emotion object started playback.\n"); diff --git a/src/examples/emotion/emotion_border_example.c b/src/examples/emotion/emotion_border_example.c index f422fbe..ea3c07d 100644 --- a/src/examples/emotion/emotion_border_example.c +++ b/src/examples/emotion/emotion_border_example.c @@ -18,7 +18,8 @@ static Eina_List *filenames = NULL; static Eina_List *curfile = NULL; static Eina_Bool -_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) +_playback_started_cb(void *data EINA_UNUSED, + Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { printf("Emotion object started playback.\n"); @@ -108,7 +109,8 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void * } static Eina_Bool -_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) +_frame_decode_cb(void *data EINA_UNUSED, + Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { // fprintf(stderr, "smartcb: frame_decode\n"); @@ -116,36 +118,40 @@ _frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) } static Eina_Bool -_length_change_cb(void *data EINA_UNUSED, const Eo_Event *event) +_length_change_cb(void *data EINA_UNUSED, + Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { - fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(event->obj)); + fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(o)); return EINA_TRUE; } static Eina_Bool -_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event) +_position_update_cb(void *data EINA_UNUSED, + Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { - fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(event->obj)); + fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(o)); return EINA_TRUE; } static Eina_Bool -_progress_change_cb(void *data EINA_UNUSED, const Eo_Event *event) +_progress_change_cb(void *data EINA_UNUSED, + Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n", - emotion_object_progress_status_get(event->obj), - emotion_object_progress_info_get(event->obj)); + emotion_object_progress_status_get(o), + emotion_object_progress_info_get(o)); return EINA_TRUE; } static Eina_Bool -_frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *event) +_frame_resize_cb(void *data EINA_UNUSED, + Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { int w, h; - emotion_object_size_get(event->obj, &w, &h); + emotion_object_size_get(o, &w, &h); fprintf(stderr, "smartcb: frame_resize: %dx%d\n", w, h); return EINA_TRUE; diff --git a/src/examples/emotion/emotion_generic_example.c b/src/examples/emotion/emotion_generic_example.c index 15059fc..cdbfe6e 100644 --- a/src/examples/emotion/emotion_generic_example.c +++ b/src/examples/emotion/emotion_generic_example.c @@ -19,7 +19,8 @@ static Eina_List *filenames = NULL; static Eina_List *curfile = NULL; static Eina_Bool -_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) +_playback_started_cb(void *data EINA_UNUSED, + Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { printf("Emotion object started playback.\n"); @@ -27,11 +28,12 @@ _playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) } static Eina_Bool -_playback_stopped_cb(void *data EINA_UNUSED, const Eo_Event *event) +_playback_stopped_cb(void *data EINA_UNUSED, + Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { printf("Emotion playback stopped.\n"); - emotion_object_play_set(event->obj, EINA_FALSE); - emotion_object_position_set(event->obj, 0); + emotion_object_play_set(o, EINA_FALSE); + emotion_object_position_set(o, 0); return EINA_TRUE; } @@ -131,7 +133,8 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void * } static Eina_Bool -_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) +_frame_decode_cb(void *data EINA_UNUSED, + Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { // fprintf(stderr, "smartcb: frame_decode\n"); @@ -139,27 +142,30 @@ _frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) } static Eina_Bool -_length_change_cb(void *data EINA_UNUSED, const Eo_Event *event) +_length_change_cb(void *data EINA_UNUSED, + Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { - fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(event->obj)); + fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(o)); return EINA_TRUE; } static Eina_Bool -_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event) +_position_update_cb(void *data EINA_UNUSED, + Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { - fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(event->obj)); + fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(o)); return EINA_TRUE; } static Eina_Bool -_progress_change_cb(void *data EINA_UNUSED, const Eo_Event *event) +_progress_change_cb(void *data EINA_UNUSED, + Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n", - emotion_object_progress_status_get(event->obj), - emotion_object_progress_info_get(event->obj)); + emotion_object_progress_status_get(obj), + emotion_object_progress_info_get(obj)); return EINA_TRUE; } diff --git a/src/examples/emotion/emotion_generic_subtitle_example.c b/src/examples/emotion/emotion_generic_subtitle_example.c index 1ecdf8b..1d32f77 100644 --- a/src/examples/emotion/emotion_generic_subtitle_example.c +++ b/src/examples/emotion/emotion_generic_subtitle_example.c @@ -14,7 +14,8 @@ #define HEIGHT (240) static Eina_Bool -_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) +_playback_started_cb(void *data EINA_UNUSED, + Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { printf("Emotion object started playback.\n"); diff --git a/src/examples/emotion/emotion_signals_example.c b/src/examples/emotion/emotion_signals_example.c index 8cf620d..b84c47d 100644 --- a/src/examples/emotion/emotion_signals_example.c +++ b/src/examples/emotion/emotion_signals_example.c @@ -34,66 +34,73 @@ _display_info(Evas_Object *o) } static Eina_Bool -_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event) +_playback_started_cb(void *data EINA_UNUSED, + Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { printf(">>> Emotion object started playback.\n"); - _display_info(event->obj); + _display_info(o); return EINA_TRUE; } static Eina_Bool -_playback_finished_cb(void *data EINA_UNUSED, const Eo_Event *event) +_playback_finished_cb(void *data EINA_UNUSED, + Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { printf(">>> Emotion object finished playback.\n"); - _display_info(event->obj); + _display_info(o); return EINA_TRUE; } static Eina_Bool -_open_done_cb(void *data EINA_UNUSED, const Eo_Event *event) +_open_done_cb(void *data EINA_UNUSED, + Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { printf(">>> Emotion object open done.\n"); - _display_info(event->obj); + _display_info(o); return EINA_TRUE; } static Eina_Bool -_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event) +_position_update_cb(void *data EINA_UNUSED, + Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { printf(">>> Emotion object first position update.\n"); - eo_event_callback_del(event->obj, EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb, NULL); - _display_info(event->obj); + eo_event_callback_del(o, EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb, NULL); + _display_info(o); return EINA_TRUE; } static Eina_Bool -_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event) +_frame_decode_cb(void *data EINA_UNUSED, + Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { printf(">>> Emotion object first frame decode.\n"); - eo_event_callback_del(event->obj, EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb, NULL); - _display_info(event->obj); + eo_event_callback_del(o, EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb, NULL); + _display_info(o); return EINA_TRUE; } static Eina_Bool -_decode_stop_cb(void *data EINA_UNUSED, const Eo_Event *event) +_decode_stop_cb(void *data EINA_UNUSED, + Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { printf(">>> Emotion object decode stop.\n"); - _display_info(event->obj); + _display_info(o); return EINA_TRUE; } static Eina_Bool -_frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *event) +_frame_resize_cb(void *data EINA_UNUSED, + Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { printf(">>> Emotion object frame resize.\n"); - _display_info(event->obj); + _display_info(o); return EINA_TRUE; } -- 2.7.4