summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-11 12:24:05 +0000
committerTom Hacohen <tom@stosb.com>2016-03-11 12:29:03 +0000
commit15646cf5e639bdd4309a2b215f394436f652d2d1 (patch)
treef072839fb79ef4e814242350fa228657c6d446fb
parent72c623603830557b9582774e5e9575629036007d (diff)
Revert "Fix examples according to the recent eo event changes."
This reverts commit d2fba6c5959f82f35984167131d3b67207780f48.
-rw-r--r--src/examples/eldbus/dbusmodel.c22
-rw-r--r--src/examples/emotion/emotion_basic_example.c3
-rw-r--r--src/examples/emotion/emotion_border_example.c28
-rw-r--r--src/examples/emotion/emotion_generic_example.c30
-rw-r--r--src/examples/emotion/emotion_generic_subtitle_example.c3
-rw-r--r--src/examples/emotion/emotion_signals_example.c39
6 files changed, 75 insertions, 50 deletions
diff --git a/src/examples/eldbus/dbusmodel.c b/src/examples/eldbus/dbusmodel.c
index ec37309e38..3e4063ea6a 100644
--- a/src/examples/eldbus/dbusmodel.c
+++ b/src/examples/eldbus/dbusmodel.c
@@ -14,9 +14,11 @@
14static unsigned int children_count = 0; 14static unsigned int children_count = 0;
15 15
16static Eina_Bool 16static Eina_Bool
17_event_interface_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event) 17_event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model,
18 const Eo_Event_Description *desc EINA_UNUSED,
19 void *event_info)
18{ 20{
19 Efl_Model_Load *actual_load = (Efl_Model_Load*)event->event_info; 21 Efl_Model_Load *actual_load = (Efl_Model_Load*)event_info;
20 Eina_Array *properties_list; 22 Eina_Array *properties_list;
21 Eina_Array_Iterator iterator; 23 Eina_Array_Iterator iterator;
22 Eina_Value const* property_value; 24 Eina_Value const* property_value;
@@ -27,8 +29,8 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
27 if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status) 29 if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
28 return EINA_TRUE; 30 return EINA_TRUE;
29 31
30 name = eldbus_model_proxy_name_get(event->obj); 32 name = eldbus_model_proxy_name_get(model);
31 efl_model_properties_get(event->obj, &properties_list); 33 efl_model_properties_get(model, &properties_list);
32 34
33 printf(" -> %s\n", name); 35 printf(" -> %s\n", name);
34 if (eina_array_count(properties_list)) 36 if (eina_array_count(properties_list))
@@ -36,7 +38,7 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
36 38
37 EINA_ARRAY_ITER_NEXT(properties_list, i, property, iterator) 39 EINA_ARRAY_ITER_NEXT(properties_list, i, property, iterator)
38 { 40 {
39 efl_model_property_get(event->obj, property, &property_value); 41 efl_model_property_get(model, property, &property_value);
40 if (property_value) 42 if (property_value)
41 { 43 {
42 prop_str = eina_value_to_string(property_value); 44 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)
55} 57}
56 58
57static Eina_Bool 59static Eina_Bool
58_event_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event) 60_event_load_status_cb(void *data EINA_UNUSED, Eo *model,
61 const Eo_Event_Description *desc EINA_UNUSED,
62 void *event_info)
59{ 63{
60 Efl_Model_Load *actual_load = (Efl_Model_Load*)event->event_info; 64 Efl_Model_Load *actual_load = (Efl_Model_Load*)event_info;
61 Eina_Accessor *accessor; 65 Eina_Accessor *accessor;
62 Eo *child = NULL; 66 Eo *child = NULL;
63 unsigned int i; 67 unsigned int i;
@@ -65,7 +69,7 @@ _event_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
65 if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status) 69 if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
66 return EINA_TRUE; 70 return EINA_TRUE;
67 71
68 efl_model_children_count_get(event->obj, &children_count); 72 efl_model_children_count_get(model, &children_count);
69 if (children_count == 0) 73 if (children_count == 0)
70 { 74 {
71 printf("Don't find Interfaces\n"); 75 printf("Don't find Interfaces\n");
@@ -73,7 +77,7 @@ _event_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
73 return EINA_FALSE; 77 return EINA_FALSE;
74 } 78 }
75 79
76 efl_model_children_slice_get(event->obj, 0, 0, &accessor); 80 efl_model_children_slice_get(model, 0, 0, &accessor);
77 printf("\nInterfaces:\n"); 81 printf("\nInterfaces:\n");
78 EINA_ACCESSOR_FOREACH(accessor, i, child) 82 EINA_ACCESSOR_FOREACH(accessor, i, child)
79 { 83 {
diff --git a/src/examples/emotion/emotion_basic_example.c b/src/examples/emotion/emotion_basic_example.c
index 9ad35750f6..9675f6b498 100644
--- a/src/examples/emotion/emotion_basic_example.c
+++ b/src/examples/emotion/emotion_basic_example.c
@@ -15,7 +15,8 @@
15#define HEIGHT (240) 15#define HEIGHT (240)
16 16
17static Eina_Bool 17static Eina_Bool
18_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) 18_playback_started_cb(void *data EINA_UNUSED,
19 Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
19{ 20{
20 printf("Emotion object started playback.\n"); 21 printf("Emotion object started playback.\n");
21 22
diff --git a/src/examples/emotion/emotion_border_example.c b/src/examples/emotion/emotion_border_example.c
index f422fbe16b..ea3c07d637 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;
18static Eina_List *curfile = NULL; 18static Eina_List *curfile = NULL;
19 19
20static Eina_Bool 20static Eina_Bool
21_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) 21_playback_started_cb(void *data EINA_UNUSED,
22 Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
22{ 23{
23 printf("Emotion object started playback.\n"); 24 printf("Emotion object started playback.\n");
24 25
@@ -108,7 +109,8 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *
108} 109}
109 110
110static Eina_Bool 111static Eina_Bool
111_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) 112_frame_decode_cb(void *data EINA_UNUSED,
113 Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
112{ 114{
113 // fprintf(stderr, "smartcb: frame_decode\n"); 115 // fprintf(stderr, "smartcb: frame_decode\n");
114 116
@@ -116,36 +118,40 @@ _frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
116} 118}
117 119
118static Eina_Bool 120static Eina_Bool
119_length_change_cb(void *data EINA_UNUSED, const Eo_Event *event) 121_length_change_cb(void *data EINA_UNUSED,
122 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
120{ 123{
121 fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(event->obj)); 124 fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(o));
122 125
123 return EINA_TRUE; 126 return EINA_TRUE;
124} 127}
125 128
126static Eina_Bool 129static Eina_Bool
127_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event) 130_position_update_cb(void *data EINA_UNUSED,
131 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
128{ 132{
129 fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(event->obj)); 133 fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(o));
130 134
131 return EINA_TRUE; 135 return EINA_TRUE;
132} 136}
133 137
134static Eina_Bool 138static Eina_Bool
135_progress_change_cb(void *data EINA_UNUSED, const Eo_Event *event) 139_progress_change_cb(void *data EINA_UNUSED,
140 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
136{ 141{
137 fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n", 142 fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n",
138 emotion_object_progress_status_get(event->obj), 143 emotion_object_progress_status_get(o),
139 emotion_object_progress_info_get(event->obj)); 144 emotion_object_progress_info_get(o));
140 145
141 return EINA_TRUE; 146 return EINA_TRUE;
142} 147}
143 148
144static Eina_Bool 149static Eina_Bool
145_frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *event) 150_frame_resize_cb(void *data EINA_UNUSED,
151 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
146{ 152{
147 int w, h; 153 int w, h;
148 emotion_object_size_get(event->obj, &w, &h); 154 emotion_object_size_get(o, &w, &h);
149 fprintf(stderr, "smartcb: frame_resize: %dx%d\n", w, h); 155 fprintf(stderr, "smartcb: frame_resize: %dx%d\n", w, h);
150 156
151 return EINA_TRUE; 157 return EINA_TRUE;
diff --git a/src/examples/emotion/emotion_generic_example.c b/src/examples/emotion/emotion_generic_example.c
index 15059fc02d..cdbfe6e1a2 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;
19static Eina_List *curfile = NULL; 19static Eina_List *curfile = NULL;
20 20
21static Eina_Bool 21static Eina_Bool
22_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) 22_playback_started_cb(void *data EINA_UNUSED,
23 Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
23{ 24{
24 printf("Emotion object started playback.\n"); 25 printf("Emotion object started playback.\n");
25 26
@@ -27,11 +28,12 @@ _playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
27} 28}
28 29
29static Eina_Bool 30static Eina_Bool
30_playback_stopped_cb(void *data EINA_UNUSED, const Eo_Event *event) 31_playback_stopped_cb(void *data EINA_UNUSED,
32 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
31{ 33{
32 printf("Emotion playback stopped.\n"); 34 printf("Emotion playback stopped.\n");
33 emotion_object_play_set(event->obj, EINA_FALSE); 35 emotion_object_play_set(o, EINA_FALSE);
34 emotion_object_position_set(event->obj, 0); 36 emotion_object_position_set(o, 0);
35 37
36 return EINA_TRUE; 38 return EINA_TRUE;
37} 39}
@@ -131,7 +133,8 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *
131} 133}
132 134
133static Eina_Bool 135static Eina_Bool
134_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) 136_frame_decode_cb(void *data EINA_UNUSED,
137 Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
135{ 138{
136 // fprintf(stderr, "smartcb: frame_decode\n"); 139 // fprintf(stderr, "smartcb: frame_decode\n");
137 140
@@ -139,27 +142,30 @@ _frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
139} 142}
140 143
141static Eina_Bool 144static Eina_Bool
142_length_change_cb(void *data EINA_UNUSED, const Eo_Event *event) 145_length_change_cb(void *data EINA_UNUSED,
146 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
143{ 147{
144 fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(event->obj)); 148 fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(o));
145 149
146 return EINA_TRUE; 150 return EINA_TRUE;
147} 151}
148 152
149static Eina_Bool 153static Eina_Bool
150_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event) 154_position_update_cb(void *data EINA_UNUSED,
155 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
151{ 156{
152 fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(event->obj)); 157 fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(o));
153 158
154 return EINA_TRUE; 159 return EINA_TRUE;
155} 160}
156 161
157static Eina_Bool 162static Eina_Bool
158_progress_change_cb(void *data EINA_UNUSED, const Eo_Event *event) 163_progress_change_cb(void *data EINA_UNUSED,
164 Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
159{ 165{
160 fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n", 166 fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n",
161 emotion_object_progress_status_get(event->obj), 167 emotion_object_progress_status_get(obj),
162 emotion_object_progress_info_get(event->obj)); 168 emotion_object_progress_info_get(obj));
163 169
164 return EINA_TRUE; 170 return EINA_TRUE;
165} 171}
diff --git a/src/examples/emotion/emotion_generic_subtitle_example.c b/src/examples/emotion/emotion_generic_subtitle_example.c
index 1ecdf8b3e4..1d32f777a6 100644
--- a/src/examples/emotion/emotion_generic_subtitle_example.c
+++ b/src/examples/emotion/emotion_generic_subtitle_example.c
@@ -14,7 +14,8 @@
14#define HEIGHT (240) 14#define HEIGHT (240)
15 15
16static Eina_Bool 16static Eina_Bool
17_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED) 17_playback_started_cb(void *data EINA_UNUSED,
18 Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
18{ 19{
19 printf("Emotion object started playback.\n"); 20 printf("Emotion object started playback.\n");
20 21
diff --git a/src/examples/emotion/emotion_signals_example.c b/src/examples/emotion/emotion_signals_example.c
index 8cf620dd63..b84c47d899 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)
34} 34}
35 35
36static Eina_Bool 36static Eina_Bool
37_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event) 37_playback_started_cb(void *data EINA_UNUSED,
38 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
38{ 39{
39 printf(">>> Emotion object started playback.\n"); 40 printf(">>> Emotion object started playback.\n");
40 _display_info(event->obj); 41 _display_info(o);
41 42
42 return EINA_TRUE; 43 return EINA_TRUE;
43} 44}
44 45
45static Eina_Bool 46static Eina_Bool
46_playback_finished_cb(void *data EINA_UNUSED, const Eo_Event *event) 47_playback_finished_cb(void *data EINA_UNUSED,
48 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
47{ 49{
48 printf(">>> Emotion object finished playback.\n"); 50 printf(">>> Emotion object finished playback.\n");
49 _display_info(event->obj); 51 _display_info(o);
50 52
51 return EINA_TRUE; 53 return EINA_TRUE;
52} 54}
53 55
54static Eina_Bool 56static Eina_Bool
55_open_done_cb(void *data EINA_UNUSED, const Eo_Event *event) 57_open_done_cb(void *data EINA_UNUSED,
58 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
56{ 59{
57 printf(">>> Emotion object open done.\n"); 60 printf(">>> Emotion object open done.\n");
58 _display_info(event->obj); 61 _display_info(o);
59 62
60 return EINA_TRUE; 63 return EINA_TRUE;
61} 64}
62 65
63static Eina_Bool 66static Eina_Bool
64_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event) 67_position_update_cb(void *data EINA_UNUSED,
68 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
65{ 69{
66 printf(">>> Emotion object first position update.\n"); 70 printf(">>> Emotion object first position update.\n");
67 eo_event_callback_del(event->obj, EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb, NULL); 71 eo_event_callback_del(o, EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb, NULL);
68 _display_info(event->obj); 72 _display_info(o);
69 73
70 return EINA_TRUE; 74 return EINA_TRUE;
71} 75}
72 76
73static Eina_Bool 77static Eina_Bool
74_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event) 78_frame_decode_cb(void *data EINA_UNUSED,
79 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
75{ 80{
76 printf(">>> Emotion object first frame decode.\n"); 81 printf(">>> Emotion object first frame decode.\n");
77 eo_event_callback_del(event->obj, EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb, NULL); 82 eo_event_callback_del(o, EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb, NULL);
78 _display_info(event->obj); 83 _display_info(o);
79 84
80 return EINA_TRUE; 85 return EINA_TRUE;
81} 86}
82 87
83static Eina_Bool 88static Eina_Bool
84_decode_stop_cb(void *data EINA_UNUSED, const Eo_Event *event) 89_decode_stop_cb(void *data EINA_UNUSED,
90 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
85{ 91{
86 printf(">>> Emotion object decode stop.\n"); 92 printf(">>> Emotion object decode stop.\n");
87 _display_info(event->obj); 93 _display_info(o);
88 94
89 return EINA_TRUE; 95 return EINA_TRUE;
90} 96}
91 97
92static Eina_Bool 98static Eina_Bool
93_frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *event) 99_frame_resize_cb(void *data EINA_UNUSED,
100 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
94{ 101{
95 printf(">>> Emotion object frame resize.\n"); 102 printf(">>> Emotion object frame resize.\n");
96 _display_info(event->obj); 103 _display_info(o);
97 104
98 return EINA_TRUE; 105 return EINA_TRUE;
99} 106}