stefan pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9d4e46c0a72316bf5de8f9cfc9052ded4e771b6b
commit 9d4e46c0a72316bf5de8f9cfc9052ded4e771b6b Author: Stefan Schmidt <ste...@osg.samsung.com> Date: Thu Jun 23 14:07:29 2016 +0200 examples: emotion: make sure all callbacks are actually setup In commit 3340745c65ef8b8361dc6eff5e746f7ce1104378 the callback array got removed letting all callback functions around as unused. Somehow the setup of all these callbacks have gone missing over various refactors. --- src/examples/emotion/emotion_signals_example.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/examples/emotion/emotion_signals_example.c b/src/examples/emotion/emotion_signals_example.c index aae1063..c85f86a 100644 --- a/src/examples/emotion/emotion_signals_example.c +++ b/src/examples/emotion/emotion_signals_example.c @@ -84,12 +84,14 @@ _frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *ev) _display_info(ev->object); } -static void -_setup_emotion_callbacks(Evas_Object *o) -{ - eo_event_callback_add - (o, EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL); -} +EO_CALLBACKS_ARRAY_DEFINE(emotion_object_example_callbacks, + { EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb }, + { EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, _playback_finished_cb }, + { EMOTION_OBJECT_EVENT_OPEN_DONE, _open_done_cb }, + { EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb }, + { EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb }, + { EMOTION_OBJECT_EVENT_DECODE_STOP, _decode_stop_cb }, + { EMOTION_OBJECT_EVENT_FRAME_RESIZE, _frame_resize_cb }); int main(int argc, const char *argv[]) @@ -142,7 +144,7 @@ main(int argc, const char *argv[]) fprintf(stderr, "Emotion: \"%s\" module could not be initialized.\n", module); _display_info(em); - _setup_emotion_callbacks(em); + eo_event_callback_array_add(em, emotion_object_example_callbacks(), NULL); if (!emotion_object_file_set(em, filename)) fprintf(stderr, "Emotion: Could not load the file \"%s\"\n", filename); --