tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d2fba6c5959f82f35984167131d3b67207780f48

commit d2fba6c5959f82f35984167131d3b67207780f48
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 9 17:16:19 2016 +0000

    Fix examples according to the recent eo event changes.
---
 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, 50 insertions(+), 75 deletions(-)

diff --git a/src/examples/eldbus/dbusmodel.c b/src/examples/eldbus/dbusmodel.c
index 3e4063e..ec37309 100644
--- a/src/examples/eldbus/dbusmodel.c
+++ b/src/examples/eldbus/dbusmodel.c
@@ -14,11 +14,9 @@
 static unsigned int children_count = 0;
 
 static Eina_Bool
-_event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model,
-                           const Eo_Event_Description *desc EINA_UNUSED,
-                           void *event_info)
+_event_interface_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Efl_Model_Load *actual_load = (Efl_Model_Load*)event_info;
+   Efl_Model_Load *actual_load = (Efl_Model_Load*)event->event_info;
    Eina_Array *properties_list;
    Eina_Array_Iterator iterator;
    Eina_Value const* property_value;
@@ -29,8 +27,8 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, Eo 
*model,
    if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
      return EINA_TRUE;
 
-   name = eldbus_model_proxy_name_get(model);
-   efl_model_properties_get(model, &properties_list);
+   name = eldbus_model_proxy_name_get(event->obj);
+   efl_model_properties_get(event->obj, &properties_list);
 
    printf(" -> %s\n", name);
    if (eina_array_count(properties_list))
@@ -38,7 +36,7 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, Eo 
*model,
 
    EINA_ARRAY_ITER_NEXT(properties_list, i, property, iterator)
      {
-        efl_model_property_get(model, property, &property_value);
+        efl_model_property_get(event->obj, property, &property_value);
         if (property_value)
           {
              prop_str = eina_value_to_string(property_value);
@@ -57,11 +55,9 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, Eo 
*model,
 }
 
 static Eina_Bool
-_event_load_status_cb(void *data EINA_UNUSED, Eo *model,
-                           const Eo_Event_Description *desc EINA_UNUSED,
-                           void *event_info)
+_event_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Efl_Model_Load *actual_load = (Efl_Model_Load*)event_info;
+   Efl_Model_Load *actual_load = (Efl_Model_Load*)event->event_info;
    Eina_Accessor *accessor;
    Eo *child = NULL;
    unsigned int i;
@@ -69,7 +65,7 @@ _event_load_status_cb(void *data EINA_UNUSED, Eo *model,
    if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
      return EINA_TRUE;
 
-   efl_model_children_count_get(model, &children_count);
+   efl_model_children_count_get(event->obj, &children_count);
    if (children_count == 0)
      {
         printf("Don't find Interfaces\n");
@@ -77,7 +73,7 @@ _event_load_status_cb(void *data EINA_UNUSED, Eo *model,
         return EINA_FALSE;
      }
 
-   efl_model_children_slice_get(model, 0, 0, &accessor);
+   efl_model_children_slice_get(event->obj, 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 9675f6b..9ad3575 100644
--- a/src/examples/emotion/emotion_basic_example.c
+++ b/src/examples/emotion/emotion_basic_example.c
@@ -15,8 +15,7 @@
 #define HEIGHT (240)
 
 static Eina_Bool
-_playback_started_cb(void *data EINA_UNUSED,
-      Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event 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 ea3c07d..f422fbe 100644
--- a/src/examples/emotion/emotion_border_example.c
+++ b/src/examples/emotion/emotion_border_example.c
@@ -18,8 +18,7 @@ static Eina_List *filenames = NULL;
 static Eina_List *curfile = NULL;
 
 static Eina_Bool
-_playback_started_cb(void *data EINA_UNUSED,
-            Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, 
void *event_info EINA_UNUSED)
+_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
 {
     printf("Emotion object started playback.\n");
 
@@ -109,8 +108,7 @@ _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,
-            Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, 
void *event_info EINA_UNUSED)
+_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
 {
    // fprintf(stderr, "smartcb: frame_decode\n");
 
@@ -118,40 +116,36 @@ _frame_decode_cb(void *data EINA_UNUSED,
 }
 
 static Eina_Bool
-_length_change_cb(void *data EINA_UNUSED,
-            Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_length_change_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   fprintf(stderr, "smartcb: length_change: %0.3f\n", 
emotion_object_play_length_get(o));
+   fprintf(stderr, "smartcb: length_change: %0.3f\n", 
emotion_object_play_length_get(event->obj));
 
    return EINA_TRUE;
 }
 
 static Eina_Bool
-_position_update_cb(void *data EINA_UNUSED,
-            Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   fprintf(stderr, "smartcb: position_update: %0.3f\n", 
emotion_object_position_get(o));
+   fprintf(stderr, "smartcb: position_update: %0.3f\n", 
emotion_object_position_get(event->obj));
 
    return EINA_TRUE;
 }
 
 static Eina_Bool
-_progress_change_cb(void *data EINA_UNUSED,
-            Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_progress_change_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n",
-          emotion_object_progress_status_get(o),
-          emotion_object_progress_info_get(o));
+          emotion_object_progress_status_get(event->obj),
+          emotion_object_progress_info_get(event->obj));
 
    return EINA_TRUE;
 }
 
 static Eina_Bool
-_frame_resize_cb(void *data EINA_UNUSED,
-            Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    int w, h;
-   emotion_object_size_get(o, &w, &h);
+   emotion_object_size_get(event->obj, &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 cdbfe6e..15059fc 100644
--- a/src/examples/emotion/emotion_generic_example.c
+++ b/src/examples/emotion/emotion_generic_example.c
@@ -19,8 +19,7 @@ static Eina_List *filenames = NULL;
 static Eina_List *curfile = NULL;
 
 static Eina_Bool
-_playback_started_cb(void *data EINA_UNUSED,
-            Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, 
void *event_info EINA_UNUSED)
+_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
 {
     printf("Emotion object started playback.\n");
 
@@ -28,12 +27,11 @@ _playback_started_cb(void *data EINA_UNUSED,
 }
 
 static Eina_Bool
-_playback_stopped_cb(void *data EINA_UNUSED,
-            Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_playback_stopped_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    printf("Emotion playback stopped.\n");
-   emotion_object_play_set(o, EINA_FALSE);
-   emotion_object_position_set(o, 0);
+   emotion_object_play_set(event->obj, EINA_FALSE);
+   emotion_object_position_set(event->obj, 0);
 
    return EINA_TRUE;
 }
@@ -133,8 +131,7 @@ _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,
-            Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, 
void *event_info EINA_UNUSED)
+_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
 {
    // fprintf(stderr, "smartcb: frame_decode\n");
 
@@ -142,30 +139,27 @@ _frame_decode_cb(void *data EINA_UNUSED,
 }
 
 static Eina_Bool
-_length_change_cb(void *data EINA_UNUSED,
-            Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_length_change_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   fprintf(stderr, "smartcb: length_change: %0.3f\n", 
emotion_object_play_length_get(o));
+   fprintf(stderr, "smartcb: length_change: %0.3f\n", 
emotion_object_play_length_get(event->obj));
 
    return EINA_TRUE;
 }
 
 static Eina_Bool
-_position_update_cb(void *data EINA_UNUSED,
-            Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   fprintf(stderr, "smartcb: position_update: %0.3f\n", 
emotion_object_position_get(o));
+   fprintf(stderr, "smartcb: position_update: %0.3f\n", 
emotion_object_position_get(event->obj));
 
    return EINA_TRUE;
 }
 
 static Eina_Bool
-_progress_change_cb(void *data EINA_UNUSED,
-            Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_progress_change_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n",
-          emotion_object_progress_status_get(obj),
-          emotion_object_progress_info_get(obj));
+          emotion_object_progress_status_get(event->obj),
+          emotion_object_progress_info_get(event->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 1d32f77..1ecdf8b 100644
--- a/src/examples/emotion/emotion_generic_subtitle_example.c
+++ b/src/examples/emotion/emotion_generic_subtitle_example.c
@@ -14,8 +14,7 @@
 #define HEIGHT (240)
 
 static Eina_Bool
-_playback_started_cb(void *data EINA_UNUSED,
-            Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, 
void *event_info EINA_UNUSED)
+_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event 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 b84c47d..8cf620d 100644
--- a/src/examples/emotion/emotion_signals_example.c
+++ b/src/examples/emotion/emotion_signals_example.c
@@ -34,73 +34,66 @@ _display_info(Evas_Object *o)
 }
 
 static Eina_Bool
-_playback_started_cb(void *data EINA_UNUSED,
-            Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    printf(">>> Emotion object started playback.\n");
-   _display_info(o);
+   _display_info(event->obj);
 
    return EINA_TRUE;
 }
 
 static Eina_Bool
-_playback_finished_cb(void *data EINA_UNUSED,
-            Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_playback_finished_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    printf(">>> Emotion object finished playback.\n");
-   _display_info(o);
+   _display_info(event->obj);
 
    return EINA_TRUE;
 }
 
 static Eina_Bool
-_open_done_cb(void *data EINA_UNUSED,
-            Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_open_done_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    printf(">>> Emotion object open done.\n");
-   _display_info(o);
+   _display_info(event->obj);
 
    return EINA_TRUE;
 }
 
 static Eina_Bool
-_position_update_cb(void *data EINA_UNUSED,
-            Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    printf(">>> Emotion object first position update.\n");
-   eo_event_callback_del(o, EMOTION_OBJECT_EVENT_POSITION_UPDATE, 
_position_update_cb, NULL);
-   _display_info(o);
+   eo_event_callback_del(event->obj, EMOTION_OBJECT_EVENT_POSITION_UPDATE, 
_position_update_cb, NULL);
+   _display_info(event->obj);
 
    return EINA_TRUE;
 }
 
 static Eina_Bool
-_frame_decode_cb(void *data EINA_UNUSED,
-            Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    printf(">>> Emotion object first frame decode.\n");
-   eo_event_callback_del(o, EMOTION_OBJECT_EVENT_FRAME_DECODE, 
_frame_decode_cb, NULL);
-   _display_info(o);
+   eo_event_callback_del(event->obj, EMOTION_OBJECT_EVENT_FRAME_DECODE, 
_frame_decode_cb, NULL);
+   _display_info(event->obj);
 
    return EINA_TRUE;
 }
 
 static Eina_Bool
-_decode_stop_cb(void *data EINA_UNUSED,
-            Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_decode_stop_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    printf(">>> Emotion object decode stop.\n");
-   _display_info(o);
+   _display_info(event->obj);
 
    return EINA_TRUE;
 }
 
 static Eina_Bool
-_frame_resize_cb(void *data EINA_UNUSED,
-            Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    printf(">>> Emotion object frame resize.\n");
-   _display_info(o);
+   _display_info(event->obj);
 
    return EINA_TRUE;
 }

-- 


Reply via email to