examples: emotion: make sure all callbacks are actually setup
In commit 3340745c65
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.
This commit is contained in:
parent
2b8912462e
commit
9d4e46c0a7
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue