jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3340745c65ef8b8361dc6eff5e746f7ce1104378
commit 3340745c65ef8b8361dc6eff5e746f7ce1104378 Author: Jean-Philippe Andre <[email protected]> Date: Thu Jun 16 13:02:19 2016 +0900 examples: Use EO_CALLBACKS_ARRAY_DEFINE in all examples Again, for Windows. --- src/examples/emotion/emotion_border_example.c | 8 +++----- src/examples/emotion/emotion_generic_example.c | 8 +++----- src/examples/emotion/emotion_signals_example.c | 11 ----------- 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) evas_object_resize(em, w - 20, h - 20); } -static const Eo_Callback_Array_Item emotion_object_example_callbacks[] = { +EO_CALLBACKS_ARRAY_DEFINE(emotion_object_example_callbacks, { EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb }, { EMOTION_OBJECT_EVENT_LENGTH_CHANGE, _length_change_cb }, { EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb }, { EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, _progress_change_cb }, - { EMOTION_OBJECT_EVENT_FRAME_RESIZE, _frame_resize_cb }, - { NULL, NULL } -}; + { EMOTION_OBJECT_EVENT_FRAME_RESIZE, _frame_resize_cb }); int main(int argc, const char *argv[]) @@ -234,7 +232,7 @@ main(int argc, const char *argv[]) ecore_evas_data_set(ee, "emotion", em); - eo_event_callback_array_add(em, emotion_object_example_callbacks, NULL); + eo_event_callback_array_add(em, emotion_object_example_callbacks(), NULL); evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_key_down, em); 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) return EINA_TRUE; } -static const Eo_Callback_Array_Item emotion_object_example_callbacks[] = { +EO_CALLBACKS_ARRAY_DEFINE(emotion_object_example_callbacks, { EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb }, { EMOTION_OBJECT_EVENT_LENGTH_CHANGE, _length_change_cb }, { EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb }, - { EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, _progress_change_cb }, - { NULL, NULL } -}; + { EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, _progress_change_cb }); int main(int argc, const char *argv[]) @@ -221,7 +219,7 @@ main(int argc, const char *argv[]) evas_object_resize(em, WIDTH, HEIGHT); evas_object_show(em); - eo_event_callback_array_add(em, emotion_object_example_callbacks, NULL); + eo_event_callback_array_add(em, emotion_object_example_callbacks(), NULL); evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_key_down, em); 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) return EINA_TRUE; } -static const Eo_Callback_Array_Item 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 }, - { NULL, NULL } -}; - static void _setup_emotion_callbacks(Evas_Object *o) { --
