summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2016-06-23 14:07:29 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2016-06-23 14:07:29 +0200
commit9d4e46c0a72316bf5de8f9cfc9052ded4e771b6b (patch)
tree6b3321b21026037f1861a07da0249832bd79203d /src/examples
parent2b8912462e0ec81efb8e30a63383b811f52e16f5 (diff)
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.
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/emotion/emotion_signals_example.c16
1 files 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)
84 _display_info(ev->object); 84 _display_info(ev->object);
85} 85}
86 86
87static void 87EO_CALLBACKS_ARRAY_DEFINE(emotion_object_example_callbacks,
88_setup_emotion_callbacks(Evas_Object *o) 88 { EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb },
89{ 89 { EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, _playback_finished_cb },
90 eo_event_callback_add 90 { EMOTION_OBJECT_EVENT_OPEN_DONE, _open_done_cb },
91 (o, EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL); 91 { EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb },
92} 92 { EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb },
93 { EMOTION_OBJECT_EVENT_DECODE_STOP, _decode_stop_cb },
94 { EMOTION_OBJECT_EVENT_FRAME_RESIZE, _frame_resize_cb });
93 95
94int 96int
95main(int argc, const char *argv[]) 97main(int argc, const char *argv[])
@@ -142,7 +144,7 @@ main(int argc, const char *argv[])
142 fprintf(stderr, "Emotion: \"%s\" module could not be initialized.\n", module); 144 fprintf(stderr, "Emotion: \"%s\" module could not be initialized.\n", module);
143 145
144 _display_info(em); 146 _display_info(em);
145 _setup_emotion_callbacks(em); 147 eo_event_callback_array_add(em, emotion_object_example_callbacks(), NULL);
146 148
147 if (!emotion_object_file_set(em, filename)) 149 if (!emotion_object_file_set(em, filename))
148 fprintf(stderr, "Emotion: Could not load the file \"%s\"\n", filename); 150 fprintf(stderr, "Emotion: Could not load the file \"%s\"\n", filename);