summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-06-16 13:02:19 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-06-16 13:10:35 +0900
commit3340745c65ef8b8361dc6eff5e746f7ce1104378 (patch)
treec3740be7be7d985da050cf3d00c3153abaab69a8 /src/examples
parent2d995fdedc6ac67bb9b7fabb38a7b4e1b3e663c9 (diff)
examples: Use EO_CALLBACKS_ARRAY_DEFINE in all examples
Again, for Windows.
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/emotion/emotion_border_example.c8
-rw-r--r--src/examples/emotion/emotion_generic_example.c8
-rw-r--r--src/examples/emotion/emotion_signals_example.c11
3 files changed, 6 insertions, 21 deletions
diff --git a/src/examples/emotion/emotion_border_example.c b/src/examples/emotion/emotion_border_example.c
index aac68fd..67c43a9 100644
--- a/src/examples/emotion/emotion_border_example.c
+++ b/src/examples/emotion/emotion_border_example.c
@@ -167,14 +167,12 @@ _canvas_resize_cb(Ecore_Evas *ee)
167 evas_object_resize(em, w - 20, h - 20); 167 evas_object_resize(em, w - 20, h - 20);
168} 168}
169 169
170static const Eo_Callback_Array_Item emotion_object_example_callbacks[] = { 170EO_CALLBACKS_ARRAY_DEFINE(emotion_object_example_callbacks,
171 { EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb }, 171 { EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb },
172 { EMOTION_OBJECT_EVENT_LENGTH_CHANGE, _length_change_cb }, 172 { EMOTION_OBJECT_EVENT_LENGTH_CHANGE, _length_change_cb },
173 { EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb }, 173 { EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb },
174 { EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, _progress_change_cb }, 174 { EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, _progress_change_cb },
175 { EMOTION_OBJECT_EVENT_FRAME_RESIZE, _frame_resize_cb }, 175 { EMOTION_OBJECT_EVENT_FRAME_RESIZE, _frame_resize_cb });
176 { NULL, NULL }
177};
178 176
179int 177int
180main(int argc, const char *argv[]) 178main(int argc, const char *argv[])
@@ -234,7 +232,7 @@ main(int argc, const char *argv[])
234 232
235 ecore_evas_data_set(ee, "emotion", em); 233 ecore_evas_data_set(ee, "emotion", em);
236 234
237 eo_event_callback_array_add(em, emotion_object_example_callbacks, NULL); 235 eo_event_callback_array_add(em, emotion_object_example_callbacks(), NULL);
238 236
239 evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_key_down, em); 237 evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_key_down, em);
240 evas_object_focus_set(bg, EINA_TRUE); 238 evas_object_focus_set(bg, EINA_TRUE);
diff --git a/src/examples/emotion/emotion_generic_example.c b/src/examples/emotion/emotion_generic_example.c
index ec15a61..f0d7fab 100644
--- a/src/examples/emotion/emotion_generic_example.c
+++ b/src/examples/emotion/emotion_generic_example.c
@@ -164,13 +164,11 @@ _progress_change_cb(void *data EINA_UNUSED, const Eo_Event *ev)
164 return EINA_TRUE; 164 return EINA_TRUE;
165} 165}
166 166
167static const Eo_Callback_Array_Item emotion_object_example_callbacks[] = { 167EO_CALLBACKS_ARRAY_DEFINE(emotion_object_example_callbacks,
168 { EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb }, 168 { EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb },
169 { EMOTION_OBJECT_EVENT_LENGTH_CHANGE, _length_change_cb }, 169 { EMOTION_OBJECT_EVENT_LENGTH_CHANGE, _length_change_cb },
170 { EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb }, 170 { EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb },
171 { EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, _progress_change_cb }, 171 { EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, _progress_change_cb });
172 { NULL, NULL }
173};
174 172
175int 173int
176main(int argc, const char *argv[]) 174main(int argc, const char *argv[])
@@ -221,7 +219,7 @@ main(int argc, const char *argv[])
221 evas_object_resize(em, WIDTH, HEIGHT); 219 evas_object_resize(em, WIDTH, HEIGHT);
222 evas_object_show(em); 220 evas_object_show(em);
223 221
224 eo_event_callback_array_add(em, emotion_object_example_callbacks, NULL); 222 eo_event_callback_array_add(em, emotion_object_example_callbacks(), NULL);
225 223
226 evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_key_down, em); 224 evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_key_down, em);
227 evas_object_focus_set(bg, EINA_TRUE); 225 evas_object_focus_set(bg, EINA_TRUE);
diff --git a/src/examples/emotion/emotion_signals_example.c b/src/examples/emotion/emotion_signals_example.c
index 1a9dcbd..ecf30a7 100644
--- a/src/examples/emotion/emotion_signals_example.c
+++ b/src/examples/emotion/emotion_signals_example.c
@@ -98,17 +98,6 @@ _frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *ev)
98 return EINA_TRUE; 98 return EINA_TRUE;
99} 99}
100 100
101static const Eo_Callback_Array_Item emotion_object_example_callbacks[] = {
102 { EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb },
103 { EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, _playback_finished_cb },
104 { EMOTION_OBJECT_EVENT_OPEN_DONE, _open_done_cb },
105 { EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb },
106 { EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb },
107 { EMOTION_OBJECT_EVENT_DECODE_STOP, _decode_stop_cb },
108 { EMOTION_OBJECT_EVENT_FRAME_RESIZE, _frame_resize_cb },
109 { NULL, NULL }
110};
111
112static void 101static void
113_setup_emotion_callbacks(Evas_Object *o) 102_setup_emotion_callbacks(Evas_Object *o)
114{ 103{