diff options
author | Avi Levin <avi.levin@samsung.com> | 2015-04-26 14:49:26 +0300 |
---|---|---|
committer | Daniel Zaoui <daniel.zaoui@samsung.com> | 2015-06-07 11:00:52 +0300 |
commit | f9c116a48749c642eb31154a4cfb5f60a110dcba (patch) | |
tree | 2cbf4d8891d6aa65c5f8867cb95549947208b864 | |
parent | b563efc52ffbc02ae33d4901326a583102975cbb (diff) |
emotion: porting evas smart callbacks to eo
-rw-r--r-- | src/examples/emotion/emotion_basic_example.c | 17 | ||||
-rw-r--r-- | src/examples/emotion/emotion_border_example.c | 66 | ||||
-rw-r--r-- | src/examples/emotion/emotion_generic_example.c | 80 | ||||
-rw-r--r-- | src/examples/emotion/emotion_generic_subtitle_example.c | 16 | ||||
-rw-r--r-- | src/examples/emotion/emotion_signals_example.c | 87 | ||||
-rw-r--r-- | src/lib/emotion/emotion_smart.c | 76 | ||||
-rw-r--r-- | src/modules/ethumb/emotion/emotion.c | 56 | ||||
-rw-r--r-- | src/tests/emotion/emotion_test_main.c | 110 |
8 files changed, 318 insertions, 190 deletions
diff --git a/src/examples/emotion/emotion_basic_example.c b/src/examples/emotion/emotion_basic_example.c index ec465bcbf3..ebf824428d 100644 --- a/src/examples/emotion/emotion_basic_example.c +++ b/src/examples/emotion/emotion_basic_example.c | |||
@@ -1,5 +1,9 @@ | |||
1 | //Compile with: | 1 | //Compile with: |
2 | // gcc -o emotion_basic_example emotion_basic_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas` | 2 | // gcc -o emotion_basic_example emotion_basic_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eo` |
3 | |||
4 | #define EFL_BETA_API_SUPPORT | ||
5 | #define EFL_EO_API_SUPPORT | ||
6 | #include <Eo.h> | ||
3 | 7 | ||
4 | #include <Ecore.h> | 8 | #include <Ecore.h> |
5 | #include <Ecore_Evas.h> | 9 | #include <Ecore_Evas.h> |
@@ -10,10 +14,13 @@ | |||
10 | #define WIDTH (320) | 14 | #define WIDTH (320) |
11 | #define HEIGHT (240) | 15 | #define HEIGHT (240) |
12 | 16 | ||
13 | static void | 17 | static Eina_Bool |
14 | _playback_started_cb(void *data EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED) | 18 | _playback_started_cb(void *data EINA_UNUSED, |
19 | Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
15 | { | 20 | { |
16 | printf("Emotion object started playback.\n"); | 21 | printf("Emotion object started playback.\n"); |
22 | |||
23 | return EINA_TRUE; | ||
17 | } | 24 | } |
18 | 25 | ||
19 | int | 26 | int |
@@ -58,8 +65,8 @@ main(int argc, const char *argv[]) | |||
58 | em = emotion_object_add(e); | 65 | em = emotion_object_add(e); |
59 | emotion_object_init(em, NULL); | 66 | emotion_object_init(em, NULL); |
60 | 67 | ||
61 | evas_object_smart_callback_add( | 68 | eo_do(em, eo_event_callback_add |
62 | em, "playback_started", _playback_started_cb, NULL); | 69 | (EMOTION_OBJECT_EVENT_PLAYBACK_START, _playback_started_cb, NULL)); |
63 | 70 | ||
64 | emotion_object_file_set(em, filename); | 71 | emotion_object_file_set(em, filename); |
65 | 72 | ||
diff --git a/src/examples/emotion/emotion_border_example.c b/src/examples/emotion/emotion_border_example.c index 695b50762b..22eca25cf1 100644 --- a/src/examples/emotion/emotion_border_example.c +++ b/src/examples/emotion/emotion_border_example.c | |||
@@ -1,5 +1,8 @@ | |||
1 | //Compile with: | 1 | //Compile with: |
2 | // gcc -o emotion_border_example emotion_border_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eina` | 2 | // gcc -o emotion_border_example emotion_border_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eina eo` |
3 | |||
4 | #define EFL_EO_API_SUPPORT | ||
5 | #define EFL_BETA_API_SUPPORT | ||
3 | 6 | ||
4 | #include <Ecore.h> | 7 | #include <Ecore.h> |
5 | #include <Ecore_Evas.h> | 8 | #include <Ecore_Evas.h> |
@@ -14,10 +17,13 @@ | |||
14 | static Eina_List *filenames = NULL; | 17 | static Eina_List *filenames = NULL; |
15 | static Eina_List *curfile = NULL; | 18 | static Eina_List *curfile = NULL; |
16 | 19 | ||
17 | static void | 20 | static Eina_Bool |
18 | _playback_started_cb(void *data EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED) | 21 | _playback_started_cb(void *data EINA_UNUSED, |
22 | Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
19 | { | 23 | { |
20 | printf("Emotion object started playback.\n"); | 24 | printf("Emotion object started playback.\n"); |
25 | |||
26 | return EINA_TRUE; | ||
21 | } | 27 | } |
22 | 28 | ||
23 | static Evas_Object * | 29 | static Evas_Object * |
@@ -27,8 +33,8 @@ _create_emotion_object(Evas *e) | |||
27 | 33 | ||
28 | emotion_object_init(em, "gstreamer1"); | 34 | emotion_object_init(em, "gstreamer1"); |
29 | 35 | ||
30 | evas_object_smart_callback_add( | 36 | eo_do(em, eo_event_callback_add( |
31 | em, "playback_started", _playback_started_cb, NULL); | 37 | EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL)); |
32 | 38 | ||
33 | return em; | 39 | return em; |
34 | } | 40 | } |
@@ -103,38 +109,53 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void * | |||
103 | } | 109 | } |
104 | } | 110 | } |
105 | 111 | ||
106 | static void | 112 | static Eina_Bool |
107 | _frame_decode_cb(void *data EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED) | 113 | _frame_decode_cb(void *data EINA_UNUSED, |
114 | Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
108 | { | 115 | { |
109 | // fprintf(stderr, "smartcb: frame_decode\n"); | 116 | // fprintf(stderr, "smartcb: frame_decode\n"); |
117 | |||
118 | return EINA_TRUE; | ||
110 | } | 119 | } |
111 | 120 | ||
112 | static void | 121 | static Eina_Bool |
113 | _length_change_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 122 | _length_change_cb(void *data EINA_UNUSED, |
123 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
114 | { | 124 | { |
115 | fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(o)); | 125 | fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(o)); |
126 | |||
127 | return EINA_TRUE; | ||
116 | } | 128 | } |
117 | 129 | ||
118 | static void | 130 | static Eina_Bool |
119 | _position_update_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 131 | _position_update_cb(void *data EINA_UNUSED, |
132 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
120 | { | 133 | { |
121 | fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(o)); | 134 | fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(o)); |
135 | |||
136 | return EINA_TRUE; | ||
122 | } | 137 | } |
123 | 138 | ||
124 | static void | 139 | static Eina_Bool |
125 | _progress_change_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 140 | _progress_change_cb(void *data EINA_UNUSED, |
141 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
126 | { | 142 | { |
127 | fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n", | 143 | fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n", |
128 | emotion_object_progress_status_get(o), | 144 | emotion_object_progress_status_get(o), |
129 | emotion_object_progress_info_get(o)); | 145 | emotion_object_progress_info_get(o)); |
146 | |||
147 | return EINA_TRUE; | ||
130 | } | 148 | } |
131 | 149 | ||
132 | static void | 150 | static Eina_Bool |
133 | _frame_resize_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 151 | _frame_resize_cb(void *data EINA_UNUSED, |
152 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
134 | { | 153 | { |
135 | int w, h; | 154 | int w, h; |
136 | emotion_object_size_get(o, &w, &h); | 155 | emotion_object_size_get(o, &w, &h); |
137 | fprintf(stderr, "smartcb: frame_resize: %dx%d\n", w, h); | 156 | fprintf(stderr, "smartcb: frame_resize: %dx%d\n", w, h); |
157 | |||
158 | return EINA_TRUE; | ||
138 | } | 159 | } |
139 | 160 | ||
140 | static void /* adjust canvas' contents on resizes */ | 161 | static void /* adjust canvas' contents on resizes */ |
@@ -153,6 +174,15 @@ _canvas_resize_cb(Ecore_Evas *ee) | |||
153 | evas_object_resize(em, w - 20, h - 20); | 174 | evas_object_resize(em, w - 20, h - 20); |
154 | } | 175 | } |
155 | 176 | ||
177 | static const Eo_Callback_Array_Item emotion_object_example_callbacks[] = { | ||
178 | { EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb }, | ||
179 | { EMOTION_OBJECT_EVENT_LENGTH_CHANGE, _length_change_cb }, | ||
180 | { EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb }, | ||
181 | { EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, _progress_change_cb }, | ||
182 | { EMOTION_OBJECT_EVENT_FRAME_RESIZE, _frame_resize_cb }, | ||
183 | { NULL, NULL } | ||
184 | }; | ||
185 | |||
156 | int | 186 | int |
157 | main(int argc, const char *argv[]) | 187 | main(int argc, const char *argv[]) |
158 | { | 188 | { |
@@ -211,11 +241,7 @@ main(int argc, const char *argv[]) | |||
211 | 241 | ||
212 | ecore_evas_data_set(ee, "emotion", em); | 242 | ecore_evas_data_set(ee, "emotion", em); |
213 | 243 | ||
214 | evas_object_smart_callback_add(em, "frame_decode", _frame_decode_cb, NULL); | 244 | eo_do(em, eo_event_callback_array_add(emotion_object_example_callbacks, NULL)); |
215 | evas_object_smart_callback_add(em, "length_change", _length_change_cb, NULL); | ||
216 | evas_object_smart_callback_add(em, "position_update", _position_update_cb, NULL); | ||
217 | evas_object_smart_callback_add(em, "progress_change", _progress_change_cb, NULL); | ||
218 | evas_object_smart_callback_add(em, "frame_resize", _frame_resize_cb, NULL); | ||
219 | 245 | ||
220 | evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_key_down, em); | 246 | evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_key_down, em); |
221 | evas_object_focus_set(bg, EINA_TRUE); | 247 | 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 9320230c88..5bd869c380 100644 --- a/src/examples/emotion/emotion_generic_example.c +++ b/src/examples/emotion/emotion_generic_example.c | |||
@@ -1,5 +1,8 @@ | |||
1 | //Compile with: | 1 | //Compile with: |
2 | // gcc -o emotion_generic_example emotion_generic_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eina` | 2 | // gcc -o emotion_generic_example emotion_generic_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eina eo` |
3 | |||
4 | #define EFL_EO_API_SUPPORT | ||
5 | #define EFL_BETA_API_SUPPORT | ||
3 | 6 | ||
4 | #include <Ecore.h> | 7 | #include <Ecore.h> |
5 | #include <Ecore_Evas.h> | 8 | #include <Ecore_Evas.h> |
@@ -15,18 +18,24 @@ | |||
15 | static Eina_List *filenames = NULL; | 18 | static Eina_List *filenames = NULL; |
16 | static Eina_List *curfile = NULL; | 19 | static Eina_List *curfile = NULL; |
17 | 20 | ||
18 | static void | 21 | static Eina_Bool |
19 | _playback_started_cb(void *data EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED) | 22 | _playback_started_cb(void *data EINA_UNUSED, |
23 | Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
20 | { | 24 | { |
21 | printf("Emotion object started playback.\n"); | 25 | printf("Emotion object started playback.\n"); |
26 | |||
27 | return EINA_TRUE; | ||
22 | } | 28 | } |
23 | 29 | ||
24 | static void | 30 | static Eina_Bool |
25 | _playback_stopped_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 31 | _playback_stopped_cb(void *data EINA_UNUSED, |
32 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
26 | { | 33 | { |
27 | printf("Emotion playback stopped.\n"); | 34 | printf("Emotion playback stopped.\n"); |
28 | emotion_object_play_set(o, EINA_FALSE); | 35 | emotion_object_play_set(o, EINA_FALSE); |
29 | emotion_object_position_set(o, 0); | 36 | emotion_object_position_set(o, 0); |
37 | |||
38 | return EINA_TRUE; | ||
30 | } | 39 | } |
31 | 40 | ||
32 | static Evas_Object * | 41 | static Evas_Object * |
@@ -36,10 +45,10 @@ _create_emotion_object(Evas *e) | |||
36 | 45 | ||
37 | emotion_object_init(em, "generic"); | 46 | emotion_object_init(em, "generic"); |
38 | 47 | ||
39 | evas_object_smart_callback_add( | 48 | eo_do(em, eo_event_callback_add |
40 | em, "playback_started", _playback_started_cb, NULL); | 49 | (EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL)); |
41 | evas_object_smart_callback_add( | 50 | eo_do(em, eo_event_callback_add |
42 | em, "playback_finished", _playback_stopped_cb, NULL); | 51 | (EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, _playback_stopped_cb, NULL)); |
43 | 52 | ||
44 | return em; | 53 | return em; |
45 | } | 54 | } |
@@ -123,40 +132,63 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void * | |||
123 | } | 132 | } |
124 | } | 133 | } |
125 | 134 | ||
126 | static void | 135 | static Eina_Bool |
127 | _frame_decode_cb(void *data EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED) | 136 | _frame_decode_cb(void *data EINA_UNUSED, |
137 | Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
128 | { | 138 | { |
129 | // fprintf(stderr, "smartcb: frame_decode\n"); | 139 | // fprintf(stderr, "smartcb: frame_decode\n"); |
140 | |||
141 | return EINA_TRUE; | ||
130 | } | 142 | } |
131 | 143 | ||
132 | static void | 144 | static Eina_Bool |
133 | _length_change_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 145 | _length_change_cb(void *data EINA_UNUSED, |
146 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
134 | { | 147 | { |
135 | fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(o)); | 148 | fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(o)); |
149 | |||
150 | return EINA_TRUE; | ||
136 | } | 151 | } |
137 | 152 | ||
138 | static void | 153 | static Eina_Bool |
139 | _position_update_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 154 | _position_update_cb(void *data EINA_UNUSED, |
155 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
140 | { | 156 | { |
141 | fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(o)); | 157 | fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(o)); |
158 | |||
159 | return EINA_TRUE; | ||
142 | } | 160 | } |
143 | 161 | ||
144 | static void | 162 | static Eina_Bool |
145 | _progress_change_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 163 | _progress_change_cb(void *data EINA_UNUSED, |
164 | Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
146 | { | 165 | { |
147 | fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n", | 166 | fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n", |
148 | emotion_object_progress_status_get(o), | 167 | emotion_object_progress_status_get(obj), |
149 | emotion_object_progress_info_get(o)); | 168 | emotion_object_progress_info_get(obj)); |
169 | |||
170 | return EINA_TRUE; | ||
150 | } | 171 | } |
151 | 172 | ||
152 | static void | 173 | static Eina_Bool |
153 | _frame_resize_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 174 | _frame_resize_cb(void *data EINA_UNUSED, |
175 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
154 | { | 176 | { |
155 | int w, h; | 177 | int w, h; |
156 | emotion_object_size_get(o, &w, &h); | 178 | emotion_object_size_get(o, &w, &h); |
157 | fprintf(stderr, "smartcb: frame_resize: %dx%d\n", w, h); | 179 | fprintf(stderr, "smartcb: frame_resize: %dx%d\n", w, h); |
180 | |||
181 | return EINA_TRUE; | ||
158 | } | 182 | } |
159 | 183 | ||
184 | static const Eo_Callback_Array_Item emotion_object_example_callbacks[] = { | ||
185 | { EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb }, | ||
186 | { EMOTION_OBJECT_EVENT_LENGTH_CHANGE, _length_change_cb }, | ||
187 | { EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb }, | ||
188 | { EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, _progress_change_cb }, | ||
189 | { NULL, NULL } | ||
190 | }; | ||
191 | |||
160 | int | 192 | int |
161 | main(int argc, const char *argv[]) | 193 | main(int argc, const char *argv[]) |
162 | { | 194 | { |
@@ -206,11 +238,7 @@ main(int argc, const char *argv[]) | |||
206 | evas_object_resize(em, WIDTH, HEIGHT); | 238 | evas_object_resize(em, WIDTH, HEIGHT); |
207 | evas_object_show(em); | 239 | evas_object_show(em); |
208 | 240 | ||
209 | evas_object_smart_callback_add(em, "frame_decode", _frame_decode_cb, NULL); | 241 | eo_do(em, eo_event_callback_array_add(emotion_object_example_callbacks, NULL)); |
210 | evas_object_smart_callback_add(em, "length_change", _length_change_cb, NULL); | ||
211 | evas_object_smart_callback_add(em, "position_update", _position_update_cb, NULL); | ||
212 | evas_object_smart_callback_add(em, "progress_change", _progress_change_cb, NULL); | ||
213 | evas_object_smart_callback_add(em, "frame_resize", _frame_resize_cb, NULL); | ||
214 | 242 | ||
215 | evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_key_down, em); | 243 | evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_key_down, em); |
216 | evas_object_focus_set(bg, EINA_TRUE); | 244 | evas_object_focus_set(bg, EINA_TRUE); |
diff --git a/src/examples/emotion/emotion_generic_subtitle_example.c b/src/examples/emotion/emotion_generic_subtitle_example.c index b5fb5a880c..03b8aab8c6 100644 --- a/src/examples/emotion/emotion_generic_subtitle_example.c +++ b/src/examples/emotion/emotion_generic_subtitle_example.c | |||
@@ -1,5 +1,8 @@ | |||
1 | //Compile with: | 1 | //Compile with: |
2 | // gcc -o emotion_generic_subtitle_example emotion_generic_subtitle_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas` | 2 | // gcc -o emotion_generic_subtitle_example emotion_generic_subtitle_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eo` |
3 | |||
4 | #define EFL_EO_API_SUPPORT | ||
5 | #define EFL_BETA_API_SUPPORT | ||
3 | 6 | ||
4 | #include <Ecore.h> | 7 | #include <Ecore.h> |
5 | #include <Ecore_Evas.h> | 8 | #include <Ecore_Evas.h> |
@@ -10,10 +13,13 @@ | |||
10 | #define WIDTH (320) | 13 | #define WIDTH (320) |
11 | #define HEIGHT (240) | 14 | #define HEIGHT (240) |
12 | 15 | ||
13 | static void | 16 | static Eina_Bool |
14 | _playback_started_cb(void *data EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED) | 17 | _playback_started_cb(void *data EINA_UNUSED, |
18 | Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
15 | { | 19 | { |
16 | printf("Emotion object started playback.\n"); | 20 | printf("Emotion object started playback.\n"); |
21 | |||
22 | return EINA_TRUE; | ||
17 | } | 23 | } |
18 | 24 | ||
19 | static void | 25 | static void |
@@ -74,8 +80,8 @@ main(int argc, const char *argv[]) | |||
74 | if (subtitle_filename) | 80 | if (subtitle_filename) |
75 | emotion_object_video_subtitle_file_set(em, subtitle_filename); | 81 | emotion_object_video_subtitle_file_set(em, subtitle_filename); |
76 | 82 | ||
77 | evas_object_smart_callback_add( | 83 | eo_do(em, eo_event_callback_add |
78 | em, "playback_started", _playback_started_cb, NULL); | 84 | (EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL)); |
79 | 85 | ||
80 | emotion_object_file_set(em, filename); | 86 | emotion_object_file_set(em, filename); |
81 | 87 | ||
diff --git a/src/examples/emotion/emotion_signals_example.c b/src/examples/emotion/emotion_signals_example.c index dd83ac2eb3..3c56c40924 100644 --- a/src/examples/emotion/emotion_signals_example.c +++ b/src/examples/emotion/emotion_signals_example.c | |||
@@ -1,5 +1,8 @@ | |||
1 | //Compile with: | 1 | //Compile with: |
2 | // gcc -o emotion_signals_example emotion_signals_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas` | 2 | // gcc -o emotion_signals_example emotion_signals_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eo` |
3 | |||
4 | #define EFL_EO_API_SUPPORT | ||
5 | #define EFL_BETA_API_SUPPORT | ||
3 | 6 | ||
4 | #include <Ecore.h> | 7 | #include <Ecore.h> |
5 | #include <Ecore_Evas.h> | 8 | #include <Ecore_Evas.h> |
@@ -30,74 +33,96 @@ _display_info(Evas_Object *o) | |||
30 | printf("\n"); | 33 | printf("\n"); |
31 | } | 34 | } |
32 | 35 | ||
33 | static void | 36 | static Eina_Bool |
34 | _playback_started_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 37 | _playback_started_cb(void *data EINA_UNUSED, |
38 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
35 | { | 39 | { |
36 | printf(">>> Emotion object started playback.\n"); | 40 | printf(">>> Emotion object started playback.\n"); |
37 | _display_info(o); | 41 | _display_info(o); |
42 | |||
43 | return EINA_TRUE; | ||
38 | } | 44 | } |
39 | 45 | ||
40 | static void | 46 | static Eina_Bool |
41 | _playback_finished_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 47 | _playback_finished_cb(void *data EINA_UNUSED, |
48 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
42 | { | 49 | { |
43 | printf(">>> Emotion object finished playback.\n"); | 50 | printf(">>> Emotion object finished playback.\n"); |
44 | _display_info(o); | 51 | _display_info(o); |
52 | |||
53 | return EINA_TRUE; | ||
45 | } | 54 | } |
46 | 55 | ||
47 | static void | 56 | static Eina_Bool |
48 | _open_done_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 57 | _open_done_cb(void *data EINA_UNUSED, |
58 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
49 | { | 59 | { |
50 | printf(">>> Emotion object open done.\n"); | 60 | printf(">>> Emotion object open done.\n"); |
51 | _display_info(o); | 61 | _display_info(o); |
62 | |||
63 | return EINA_TRUE; | ||
52 | } | 64 | } |
53 | 65 | ||
54 | static void | 66 | static Eina_Bool |
55 | _position_update_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 67 | _position_update_cb(void *data EINA_UNUSED, |
68 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
56 | { | 69 | { |
57 | printf(">>> Emotion object first position update.\n"); | 70 | printf(">>> Emotion object first position update.\n"); |
58 | evas_object_smart_callback_del(o, "position_update", _position_update_cb); | 71 | eo_do(o, eo_event_callback_del(EMOTION_OBJECT_EVENT_POSITION_UPDATE, |
72 | _position_update_cb, NULL)); | ||
59 | _display_info(o); | 73 | _display_info(o); |
74 | |||
75 | return EINA_TRUE; | ||
60 | } | 76 | } |
61 | 77 | ||
62 | static void | 78 | static Eina_Bool |
63 | _frame_decode_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 79 | _frame_decode_cb(void *data EINA_UNUSED, |
80 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
64 | { | 81 | { |
65 | printf(">>> Emotion object first frame decode.\n"); | 82 | printf(">>> Emotion object first frame decode.\n"); |
66 | evas_object_smart_callback_del(o, "frame_decode", _frame_decode_cb); | 83 | eo_do(o, eo_event_callback_del(EMOTION_OBJECT_EVENT_FRAME_DECODE, |
84 | _frame_decode_cb, NULL)); | ||
67 | _display_info(o); | 85 | _display_info(o); |
86 | |||
87 | return EINA_TRUE; | ||
68 | } | 88 | } |
69 | 89 | ||
70 | static void | 90 | static Eina_Bool |
71 | _decode_stop_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 91 | _decode_stop_cb(void *data EINA_UNUSED, |
92 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
72 | { | 93 | { |
73 | printf(">>> Emotion object decode stop.\n"); | 94 | printf(">>> Emotion object decode stop.\n"); |
74 | _display_info(o); | 95 | _display_info(o); |
96 | |||
97 | return EINA_TRUE; | ||
75 | } | 98 | } |
76 | 99 | ||
77 | static void | 100 | static Eina_Bool |
78 | _frame_resize_cb(void *data EINA_UNUSED, Evas_Object *o, void *event_info EINA_UNUSED) | 101 | _frame_resize_cb(void *data EINA_UNUSED, |
102 | Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
79 | { | 103 | { |
80 | printf(">>> Emotion object frame resize.\n"); | 104 | printf(">>> Emotion object frame resize.\n"); |
81 | _display_info(o); | 105 | _display_info(o); |
106 | |||
107 | return EINA_TRUE; | ||
82 | } | 108 | } |
83 | 109 | ||
110 | static const Eo_Callback_Array_Item emotion_object_example_callbacks[] = { | ||
111 | { EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb }, | ||
112 | { EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, _playback_finished_cb }, | ||
113 | { EMOTION_OBJECT_EVENT_OPEN_DONE, _open_done_cb }, | ||
114 | { EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb }, | ||
115 | { EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb }, | ||
116 | { EMOTION_OBJECT_EVENT_DECODE_STOP, _decode_stop_cb }, | ||
117 | { EMOTION_OBJECT_EVENT_FRAME_RESIZE, _frame_resize_cb }, | ||
118 | { NULL, NULL } | ||
119 | }; | ||
120 | |||
84 | static void | 121 | static void |
85 | _setup_emotion_callbacks(Evas_Object *o) | 122 | _setup_emotion_callbacks(Evas_Object *o) |
86 | { | 123 | { |
87 | evas_object_smart_callback_add( | 124 | eo_do(o, eo_event_callback_add |
88 | o, "playback_started", _playback_started_cb, NULL); | 125 | (EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL)); |
89 | evas_object_smart_callback_add( | ||
90 | o, "playback_finished", _playback_finished_cb, NULL); | ||
91 | evas_object_smart_callback_add( | ||
92 | o, "open_done", _open_done_cb, NULL); | ||
93 | evas_object_smart_callback_add( | ||
94 | o, "position_update", _position_update_cb, NULL); | ||
95 | evas_object_smart_callback_add( | ||
96 | o, "frame_decode", _frame_decode_cb, NULL); | ||
97 | evas_object_smart_callback_add( | ||
98 | o, "decode_stop", _decode_stop_cb, NULL); | ||
99 | evas_object_smart_callback_add( | ||
100 | o, "frame_resize", _frame_resize_cb, NULL); | ||
101 | } | 126 | } |
102 | 127 | ||
103 | int | 128 | int |
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c index fbbbb49170..ea1130e3fd 100644 --- a/src/lib/emotion/emotion_smart.c +++ b/src/lib/emotion/emotion_smart.c | |||
@@ -123,29 +123,6 @@ static void _mouse_down(void *data, Evas *ev, Evas_Object *obj, void *event_info | |||
123 | static void _pos_set_job(void *data); | 123 | static void _pos_set_job(void *data); |
124 | static void _pixels_get(void *data, Evas_Object *obj); | 124 | static void _pixels_get(void *data, Evas_Object *obj); |
125 | 125 | ||
126 | /**********************************/ | ||
127 | /* Globals for the E Video Object */ | ||
128 | /**********************************/ | ||
129 | static const char SIG_FRAME_DECODE[] = "frame_decode"; | ||
130 | static const char SIG_POSITION_UPDATE[] = "position_update"; | ||
131 | static const char SIG_LENGTH_CHANGE[] = "length_change"; | ||
132 | static const char SIG_FRAME_RESIZE[] = "frame_resize"; | ||
133 | static const char SIG_DECODE_STOP[] = "decode_stop"; | ||
134 | static const char SIG_PLAYBACK_STARTED[] = "playback_started"; | ||
135 | static const char SIG_PLAYBACK_FINISHED[] = "playback_finished"; | ||
136 | static const char SIG_AUDIO_LEVEL_CHANGE[] = "audio_level_change"; | ||
137 | static const char SIG_CHANNELS_CHANGE[] = "channels_change"; | ||
138 | static const char SIG_TITLE_CHANGE[] = "title_change"; | ||
139 | static const char SIG_PROGRESS_CHANGE[] = "progress_change"; | ||
140 | static const char SIG_REF_CHANGE[] = "ref_change"; | ||
141 | static const char SIG_BUTTON_NUM_CHANGE[] = "button_num_change"; | ||
142 | static const char SIG_BUTTON_CHANGE[] = "button_change"; | ||
143 | static const char SIG_OPEN_DONE[] = "open_done"; | ||
144 | static const char SIG_POSITION_SAVE_SUCCEED[] = "position_save,succeed"; | ||
145 | static const char SIG_POSITION_SAVE_FAILED[] = "position_save,failed"; | ||
146 | static const char SIG_POSITION_LOAD_SUCCEED[] = "position_load,succeed"; | ||
147 | static const char SIG_POSITION_LOAD_FAILED[] = "position_load,failed"; | ||
148 | |||
149 | static void | 126 | static void |
150 | _engine_init(Eo *obj, Emotion_Object_Data *sd) | 127 | _engine_init(Eo *obj, Emotion_Object_Data *sd) |
151 | { | 128 | { |
@@ -1341,7 +1318,8 @@ _eio_load_xattr_done(void *data, Eio_File *handler, double xattr_double) | |||
1341 | Emotion_Object_Data *sd = data; | 1318 | Emotion_Object_Data *sd = data; |
1342 | 1319 | ||
1343 | emotion_object_position_set(evas_object_smart_parent_get(sd->obj), xattr_double); | 1320 | emotion_object_position_set(evas_object_smart_parent_get(sd->obj), xattr_double); |
1344 | evas_object_smart_callback_call(evas_object_smart_parent_get(sd->obj), SIG_POSITION_LOAD_SUCCEED, NULL); | 1321 | eo_do(evas_object_smart_parent_get(sd->obj), |
1322 | eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL)); | ||
1345 | _eio_load_xattr_cleanup(sd, handler); | 1323 | _eio_load_xattr_cleanup(sd, handler); |
1346 | } | 1324 | } |
1347 | 1325 | ||
@@ -1350,7 +1328,8 @@ _eio_load_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED) | |||
1350 | { | 1328 | { |
1351 | Emotion_Object_Data *sd = data; | 1329 | Emotion_Object_Data *sd = data; |
1352 | 1330 | ||
1353 | evas_object_smart_callback_call(evas_object_smart_parent_get(sd->obj), SIG_POSITION_LOAD_FAILED, NULL); | 1331 | eo_do(evas_object_smart_parent_get(sd->obj), |
1332 | eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL)); | ||
1354 | _eio_load_xattr_cleanup(sd, handler); | 1333 | _eio_load_xattr_cleanup(sd, handler); |
1355 | } | 1334 | } |
1356 | #endif | 1335 | #endif |
@@ -1385,10 +1364,10 @@ emotion_object_last_position_load(Evas_Object *obj) | |||
1385 | if (eina_xattr_double_get(tmp, "user.e.time_seek", &xattr)) | 1364 | if (eina_xattr_double_get(tmp, "user.e.time_seek", &xattr)) |
1386 | { | 1365 | { |
1387 | emotion_object_position_set(obj, xattr); | 1366 | emotion_object_position_set(obj, xattr); |
1388 | evas_object_smart_callback_call(obj, SIG_POSITION_LOAD_SUCCEED, NULL); | 1367 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL)); |
1389 | } | 1368 | } |
1390 | else | 1369 | else |
1391 | evas_object_smart_callback_call(obj, SIG_POSITION_LOAD_FAILED, NULL); | 1370 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL)); |
1392 | #endif | 1371 | #endif |
1393 | } | 1372 | } |
1394 | 1373 | ||
@@ -1411,7 +1390,7 @@ _eio_save_xattr_done(void *data, Eio_File *handler) | |||
1411 | { | 1390 | { |
1412 | Emotion_Object_Data *sd = data; | 1391 | Emotion_Object_Data *sd = data; |
1413 | 1392 | ||
1414 | evas_object_smart_callback_call(sd->obj, SIG_POSITION_SAVE_SUCCEED, NULL); | 1393 | eo_do(sd->obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL)); |
1415 | _eio_save_xattr_cleanup(sd, handler); | 1394 | _eio_save_xattr_cleanup(sd, handler); |
1416 | } | 1395 | } |
1417 | 1396 | ||
@@ -1420,7 +1399,7 @@ _eio_save_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED) | |||
1420 | { | 1399 | { |
1421 | Emotion_Object_Data *sd = data; | 1400 | Emotion_Object_Data *sd = data; |
1422 | 1401 | ||
1423 | evas_object_smart_callback_call(sd->obj, SIG_POSITION_SAVE_FAILED, NULL); | 1402 | eo_do(sd->obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL)); |
1424 | _eio_save_xattr_cleanup(sd, handler); | 1403 | _eio_save_xattr_cleanup(sd, handler); |
1425 | } | 1404 | } |
1426 | #endif | 1405 | #endif |
@@ -1450,9 +1429,10 @@ emotion_object_last_position_save(Evas_Object *obj) | |||
1450 | sd); | 1429 | sd); |
1451 | #else | 1430 | #else |
1452 | if (eina_xattr_double_set(tmp, "user.e.time_seek", emotion_object_position_get(obj), 0)) | 1431 | if (eina_xattr_double_set(tmp, "user.e.time_seek", emotion_object_position_get(obj), 0)) |
1453 | evas_object_smart_callback_call(obj, SIG_POSITION_SAVE_SUCCEED, NULL); | 1432 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL)); |
1454 | else | 1433 | else |
1455 | evas_object_smart_callback_call(obj, SIG_POSITION_SAVE_FAILED, NULL); | 1434 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL)); |
1435 | |||
1456 | #endif | 1436 | #endif |
1457 | } | 1437 | } |
1458 | 1438 | ||
@@ -1513,7 +1493,7 @@ _emotion_frame_anim(void *data) | |||
1513 | _emotion_video_pos_update(obj, | 1493 | _emotion_video_pos_update(obj, |
1514 | emotion_engine_instance_pos_get(sd->engine_instance), | 1494 | emotion_engine_instance_pos_get(sd->engine_instance), |
1515 | emotion_engine_instance_len_get(sd->engine_instance)); | 1495 | emotion_engine_instance_len_get(sd->engine_instance)); |
1516 | evas_object_smart_callback_call(obj, SIG_FRAME_DECODE, NULL); | 1496 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_FRAME_DECODE, NULL)); |
1517 | return EINA_FALSE; | 1497 | return EINA_FALSE; |
1518 | } | 1498 | } |
1519 | 1499 | ||
@@ -1537,8 +1517,10 @@ _emotion_video_pos_update(Evas_Object *obj, double pos, double len) | |||
1537 | if (len != sd->len) nlen = 1; | 1517 | if (len != sd->len) nlen = 1; |
1538 | sd->pos = pos; | 1518 | sd->pos = pos; |
1539 | sd->len = len; | 1519 | sd->len = len; |
1540 | if (npos) evas_object_smart_callback_call(obj, SIG_POSITION_UPDATE, NULL); | 1520 | if (npos) eo_do(obj, |
1541 | if (nlen) evas_object_smart_callback_call(obj, SIG_LENGTH_CHANGE, NULL); | 1521 | eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_UPDATE, NULL)); |
1522 | if (nlen) eo_do(obj, | ||
1523 | eo_event_callback_call(EMOTION_OBJECT_EVENT_LENGTH_CHANGE, NULL)); | ||
1542 | } | 1524 | } |
1543 | 1525 | ||
1544 | EAPI void | 1526 | EAPI void |
@@ -1567,7 +1549,7 @@ _emotion_frame_resize(Evas_Object *obj, int w, int h, double ratio) | |||
1567 | if (changed) | 1549 | if (changed) |
1568 | { | 1550 | { |
1569 | evas_object_size_hint_request_set(obj, w, h); | 1551 | evas_object_size_hint_request_set(obj, w, h); |
1570 | evas_object_smart_callback_call(obj, SIG_FRAME_RESIZE, NULL); | 1552 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_FRAME_RESIZE, NULL)); |
1571 | evas_object_geometry_get(obj, NULL, NULL, &w, &h); | 1553 | evas_object_geometry_get(obj, NULL, NULL, &w, &h); |
1572 | _emotion_object_aspect_border_apply(obj, sd, w, h); | 1554 | _emotion_object_aspect_border_apply(obj, sd, w, h); |
1573 | } | 1555 | } |
@@ -1591,7 +1573,7 @@ _emotion_decode_stop(Evas_Object *obj) | |||
1591 | if (sd->play) | 1573 | if (sd->play) |
1592 | { | 1574 | { |
1593 | sd->play = 0; | 1575 | sd->play = 0; |
1594 | evas_object_smart_callback_call(obj, SIG_DECODE_STOP, NULL); | 1576 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_DECODE_STOP, NULL)); |
1595 | } | 1577 | } |
1596 | } | 1578 | } |
1597 | 1579 | ||
@@ -1607,25 +1589,26 @@ _emotion_open_done(Evas_Object *obj) | |||
1607 | emotion_object_position_set(obj, sd->remember_jump); | 1589 | emotion_object_position_set(obj, sd->remember_jump); |
1608 | if (sd->remember_play != sd->play) | 1590 | if (sd->remember_play != sd->play) |
1609 | emotion_object_play_set(obj, sd->remember_play); | 1591 | emotion_object_play_set(obj, sd->remember_play); |
1610 | evas_object_smart_callback_call(obj, SIG_OPEN_DONE, NULL); | 1592 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_OPEN_DONE, NULL)); |
1593 | |||
1611 | } | 1594 | } |
1612 | 1595 | ||
1613 | EAPI void | 1596 | EAPI void |
1614 | _emotion_playback_started(Evas_Object *obj) | 1597 | _emotion_playback_started(Evas_Object *obj) |
1615 | { | 1598 | { |
1616 | evas_object_smart_callback_call(obj, SIG_PLAYBACK_STARTED, NULL); | 1599 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, NULL)); |
1617 | } | 1600 | } |
1618 | 1601 | ||
1619 | EAPI void | 1602 | EAPI void |
1620 | _emotion_playback_finished(Evas_Object *obj) | 1603 | _emotion_playback_finished(Evas_Object *obj) |
1621 | { | 1604 | { |
1622 | evas_object_smart_callback_call(obj, SIG_PLAYBACK_FINISHED, NULL); | 1605 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, NULL)); |
1623 | } | 1606 | } |
1624 | 1607 | ||
1625 | EAPI void | 1608 | EAPI void |
1626 | _emotion_audio_level_change(Evas_Object *obj) | 1609 | _emotion_audio_level_change(Evas_Object *obj) |
1627 | { | 1610 | { |
1628 | evas_object_smart_callback_call(obj, SIG_AUDIO_LEVEL_CHANGE, NULL); | 1611 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_AUDIO_LEVEL_CHANGE, NULL)); |
1629 | } | 1612 | } |
1630 | 1613 | ||
1631 | EAPI void | 1614 | EAPI void |
@@ -1634,7 +1617,7 @@ _emotion_channels_change(Evas_Object *obj) | |||
1634 | Emotion_Object_Data *sd; | 1617 | Emotion_Object_Data *sd; |
1635 | 1618 | ||
1636 | E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); | 1619 | E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); |
1637 | evas_object_smart_callback_call(obj, SIG_CHANNELS_CHANGE, NULL); | 1620 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_CHANNELS_CHANGE, NULL)); |
1638 | } | 1621 | } |
1639 | 1622 | ||
1640 | EAPI void | 1623 | EAPI void |
@@ -1644,7 +1627,8 @@ _emotion_title_set(Evas_Object *obj, char *title) | |||
1644 | 1627 | ||
1645 | E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); | 1628 | E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); |
1646 | eina_stringshare_replace(&sd->title, title); | 1629 | eina_stringshare_replace(&sd->title, title); |
1647 | evas_object_smart_callback_call(obj, SIG_TITLE_CHANGE, NULL); | 1630 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_TITLE_CHANGE, NULL)); |
1631 | |||
1648 | } | 1632 | } |
1649 | 1633 | ||
1650 | EAPI void | 1634 | EAPI void |
@@ -1655,7 +1639,7 @@ _emotion_progress_set(Evas_Object *obj, char *info, double st) | |||
1655 | E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); | 1639 | E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); |
1656 | eina_stringshare_replace(&sd->progress.info, info); | 1640 | eina_stringshare_replace(&sd->progress.info, info); |
1657 | sd->progress.stat = st; | 1641 | sd->progress.stat = st; |
1658 | evas_object_smart_callback_call(obj, SIG_PROGRESS_CHANGE, NULL); | 1642 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, NULL)); |
1659 | } | 1643 | } |
1660 | 1644 | ||
1661 | EAPI void | 1645 | EAPI void |
@@ -1666,7 +1650,7 @@ _emotion_file_ref_set(Evas_Object *obj, const char *file, int num) | |||
1666 | E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); | 1650 | E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); |
1667 | eina_stringshare_replace(&sd->ref.file, file); | 1651 | eina_stringshare_replace(&sd->ref.file, file); |
1668 | sd->ref.num = num; | 1652 | sd->ref.num = num; |
1669 | evas_object_smart_callback_call(obj, SIG_REF_CHANGE, NULL); | 1653 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_REF_CHANGE, NULL)); |
1670 | } | 1654 | } |
1671 | 1655 | ||
1672 | EAPI void | 1656 | EAPI void |
@@ -1676,7 +1660,7 @@ _emotion_spu_button_num_set(Evas_Object *obj, int num) | |||
1676 | 1660 | ||
1677 | E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); | 1661 | E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); |
1678 | sd->spu.button_num = num; | 1662 | sd->spu.button_num = num; |
1679 | evas_object_smart_callback_call(obj, SIG_BUTTON_NUM_CHANGE, NULL); | 1663 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_BUTTON_NUM_CHANGE, NULL)); |
1680 | } | 1664 | } |
1681 | 1665 | ||
1682 | EAPI void | 1666 | EAPI void |
@@ -1686,7 +1670,7 @@ _emotion_spu_button_set(Evas_Object *obj, int button) | |||
1686 | 1670 | ||
1687 | E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); | 1671 | E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); |
1688 | sd->spu.button = button; | 1672 | sd->spu.button = button; |
1689 | evas_object_smart_callback_call(obj, SIG_BUTTON_CHANGE, NULL); | 1673 | eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_BUTTON_CHANGE, NULL)); |
1690 | } | 1674 | } |
1691 | 1675 | ||
1692 | EAPI void | 1676 | EAPI void |
diff --git a/src/modules/ethumb/emotion/emotion.c b/src/modules/ethumb/emotion/emotion.c index 4443712be6..6134406af3 100644 --- a/src/modules/ethumb/emotion/emotion.c +++ b/src/modules/ethumb/emotion/emotion.c | |||
@@ -1,5 +1,8 @@ | |||
1 | #ifdef HAVE_CONFIG_H | 1 | #ifdef HAVE_CONFIG_H |
2 | #include "config.h" | 2 | #include "config.h" |
3 | #else | ||
4 | #define EFL_EO_API_SUPPORT | ||
5 | #define EFL_BETA_API_SUPPORT | ||
3 | #endif | 6 | #endif |
4 | 7 | ||
5 | #include "Ethumb.h" | 8 | #include "Ethumb.h" |
@@ -9,6 +12,7 @@ | |||
9 | 12 | ||
10 | #include <stdio.h> | 13 | #include <stdio.h> |
11 | #include <stdlib.h> | 14 | #include <stdlib.h> |
15 | #include <Eo.h> | ||
12 | #include <Eina.h> | 16 | #include <Eina.h> |
13 | #include <Eet.h> | 17 | #include <Eet.h> |
14 | #include <Ecore_File.h> | 18 | #include <Ecore_File.h> |
@@ -67,8 +71,9 @@ _resize_movie(struct _emotion_plugin *_plugin) | |||
67 | emotion_object_audio_mute_set(_plugin->video, 1); | 71 | emotion_object_audio_mute_set(_plugin->video, 1); |
68 | } | 72 | } |
69 | 73 | ||
70 | static void | 74 | static Eina_Bool |
71 | _frame_decode_cb(void *data, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED) | 75 | _frame_decode_cb(void *data, |
76 | Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
72 | { | 77 | { |
73 | struct _emotion_plugin *_plugin = data; | 78 | struct _emotion_plugin *_plugin = data; |
74 | 79 | ||
@@ -76,16 +81,22 @@ _frame_decode_cb(void *data, Evas_Object *o EINA_UNUSED, void *event_info EINA_U | |||
76 | _frame_grab(data); | 81 | _frame_grab(data); |
77 | else | 82 | else |
78 | _frame_grab_single(data); | 83 | _frame_grab_single(data); |
79 | } | ||
80 | 84 | ||
81 | static void | 85 | return EINA_TRUE; |
82 | _frame_resized_cb(void *data, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED) | 86 | } |
87 | |||
88 | static Eina_Bool | ||
89 | _frame_resized_cb(void *data, | ||
90 | Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
83 | { | 91 | { |
84 | _resize_movie(data); | 92 | _resize_movie(data); |
93 | |||
94 | return EINA_TRUE; | ||
85 | } | 95 | } |
86 | 96 | ||
87 | static void | 97 | static Eina_Bool |
88 | _video_stopped_cb(void *data, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED) | 98 | _video_stopped_cb(void *data, |
99 | Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
89 | { | 100 | { |
90 | struct _emotion_plugin *_plugin = data; | 101 | struct _emotion_plugin *_plugin = data; |
91 | 102 | ||
@@ -94,6 +105,8 @@ _video_stopped_cb(void *data, Evas_Object *o EINA_UNUSED, void *event_info EINA_ | |||
94 | _plugin->ptotal = 0; | 105 | _plugin->ptotal = 0; |
95 | _plugin->first = EINA_FALSE; | 106 | _plugin->first = EINA_FALSE; |
96 | _plugin->total_time = _plugin->tmp_time; | 107 | _plugin->total_time = _plugin->tmp_time; |
108 | |||
109 | return EINA_TRUE; | ||
97 | } | 110 | } |
98 | 111 | ||
99 | static void | 112 | static void |
@@ -194,12 +207,12 @@ _finish_thumb_generation(struct _emotion_plugin *_plugin, int success) | |||
194 | { | 207 | { |
195 | int r = 0; | 208 | int r = 0; |
196 | 209 | ||
197 | evas_object_smart_callback_del(_plugin->video, "frame_resize", | 210 | eo_do(_plugin->video, eo_event_callback_del( |
198 | _frame_resized_cb); | 211 | EMOTION_OBJECT_EVENT_FRAME_RESIZE, _frame_resized_cb, _plugin)); |
199 | evas_object_smart_callback_del(_plugin->video, "frame_decode", | 212 | eo_do(_plugin->video, eo_event_callback_del( |
200 | _frame_decode_cb); | 213 | EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb, _plugin)); |
201 | evas_object_smart_callback_del(_plugin->video, "decode_stop", | 214 | eo_do(_plugin->video, eo_event_callback_del( |
202 | _video_stopped_cb); | 215 | EMOTION_OBJECT_EVENT_DECODE_STOP, _video_stopped_cb, _plugin)); |
203 | 216 | ||
204 | emotion_object_play_set(_plugin->video, 0); | 217 | emotion_object_play_set(_plugin->video, 0); |
205 | 218 | ||
@@ -243,8 +256,9 @@ _frame_grab_single(void *data) | |||
243 | 256 | ||
244 | ethumb_image_save(e); | 257 | ethumb_image_save(e); |
245 | 258 | ||
246 | evas_object_smart_callback_del(_plugin->video, "frame_resize", | 259 | eo_do(_plugin->video, eo_event_callback_del( |
247 | _frame_resized_cb); | 260 | EMOTION_OBJECT_EVENT_FRAME_RESIZE, _frame_resized_cb, _plugin)); |
261 | |||
248 | emotion_object_play_set(_plugin->video, 0); | 262 | emotion_object_play_set(_plugin->video, 0); |
249 | evas_object_del(_plugin->video); | 263 | evas_object_del(_plugin->video); |
250 | free(_plugin); | 264 | free(_plugin); |
@@ -383,12 +397,12 @@ _thumb_generate(Ethumb *e) | |||
383 | _plugin->pcount = 1; | 397 | _plugin->pcount = 1; |
384 | 398 | ||
385 | _resize_movie(_plugin); | 399 | _resize_movie(_plugin); |
386 | evas_object_smart_callback_add(o, "frame_decode", | 400 | eo_do(o, eo_event_callback_add |
387 | _frame_decode_cb, _plugin); | 401 | (EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb, _plugin)); |
388 | evas_object_smart_callback_add(o, "frame_resize", | 402 | eo_do(o, eo_event_callback_add |
389 | _frame_resized_cb, _plugin); | 403 | (EMOTION_OBJECT_EVENT_FRAME_RESIZE,_frame_resized_cb, _plugin)); |
390 | evas_object_smart_callback_add(o, "decode_stop", | 404 | eo_do(o, eo_event_callback_add |
391 | _video_stopped_cb, _plugin); | 405 | (EMOTION_OBJECT_EVENT_DECODE_STOP, _video_stopped_cb, _plugin)); |
392 | 406 | ||
393 | if (f == ETHUMB_THUMB_EET) | 407 | if (f == ETHUMB_THUMB_EET) |
394 | { | 408 | { |
diff --git a/src/tests/emotion/emotion_test_main.c b/src/tests/emotion/emotion_test_main.c index 24ab7dbffe..3d7d4a935e 100644 --- a/src/tests/emotion/emotion_test_main.c +++ b/src/tests/emotion/emotion_test_main.c | |||
@@ -1,7 +1,11 @@ | |||
1 | #ifdef HAVE_CONFIG_H | 1 | #ifdef HAVE_CONFIG_H |
2 | # include "config.h" | 2 | #include "config.h" |
3 | #else | ||
4 | #define EFL_EO_API_SUPPORT | ||
5 | #define EFL_BETA_API_SUPPORT | ||
3 | #endif | 6 | #endif |
4 | 7 | ||
8 | #include <Eo.h> | ||
5 | #include <stdlib.h> | 9 | #include <stdlib.h> |
6 | #include <stdio.h> | 10 | #include <stdio.h> |
7 | #include <string.h> | 11 | #include <string.h> |
@@ -325,8 +329,9 @@ video_obj_time_changed(Evas_Object *obj, Evas_Object *edje) | |||
325 | edje_object_part_text_set(edje, "video_progress_txt", buf); | 329 | edje_object_part_text_set(edje, "video_progress_txt", buf); |
326 | } | 330 | } |
327 | 331 | ||
328 | static void | 332 | static Eina_Bool |
329 | video_obj_frame_decode_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) | 333 | video_obj_frame_decode_cb(void *data, |
334 | Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
330 | { | 335 | { |
331 | video_obj_time_changed(obj, data); | 336 | video_obj_time_changed(obj, data); |
332 | 337 | ||
@@ -338,10 +343,12 @@ video_obj_frame_decode_cb(void *data, Evas_Object *obj, void *event_info EINA_UN | |||
338 | printf("FPS: %3.3f\n", 1.0 / (t - pt)); | 343 | printf("FPS: %3.3f\n", 1.0 / (t - pt)); |
339 | pt = t; | 344 | pt = t; |
340 | } | 345 | } |
346 | return EINA_TRUE; | ||
341 | } | 347 | } |
342 | 348 | ||
343 | static void | 349 | static Eina_Bool |
344 | video_obj_frame_resize_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) | 350 | video_obj_frame_resize_cb(void *data, |
351 | Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
345 | { | 352 | { |
346 | Evas_Object *oe; | 353 | Evas_Object *oe; |
347 | int iw, ih; | 354 | int iw, ih; |
@@ -359,24 +366,33 @@ video_obj_frame_resize_cb(void *data, Evas_Object *obj, void *event_info EINA_UN | |||
359 | evas_object_resize(oe, w, h); | 366 | evas_object_resize(oe, w, h); |
360 | evas_object_size_hint_min_set(obj, 0, 0); | 367 | evas_object_size_hint_min_set(obj, 0, 0); |
361 | edje_object_part_swallow(oe, "video_swallow", obj); | 368 | edje_object_part_swallow(oe, "video_swallow", obj); |
369 | |||
370 | return EINA_TRUE; | ||
362 | } | 371 | } |
363 | 372 | ||
364 | static void | 373 | static Eina_Bool |
365 | video_obj_length_change_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) | 374 | video_obj_length_change_cb(void *data, |
375 | Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
366 | { | 376 | { |
367 | printf("len change!\n"); | 377 | printf("len change!\n"); |
368 | video_obj_time_changed(obj, data); | 378 | video_obj_time_changed(obj, data); |
379 | |||
380 | return EINA_TRUE; | ||
369 | } | 381 | } |
370 | 382 | ||
371 | static void | 383 | static Eina_Bool |
372 | video_obj_position_update_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) | 384 | video_obj_position_update_cb(void *data, |
385 | Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
373 | { | 386 | { |
374 | printf("pos up!\n"); | 387 | printf("pos up!\n"); |
375 | video_obj_time_changed(obj, data); | 388 | video_obj_time_changed(obj, data); |
389 | |||
390 | return EINA_TRUE; | ||
376 | } | 391 | } |
377 | 392 | ||
378 | static void | 393 | static Eina_Bool |
379 | video_obj_stopped_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) | 394 | video_obj_stopped_cb(void *data EINA_UNUSED, |
395 | Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
380 | { | 396 | { |
381 | printf("video stopped!!!\n"); | 397 | printf("video stopped!!!\n"); |
382 | if (loop) | 398 | if (loop) |
@@ -384,53 +400,72 @@ video_obj_stopped_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info | |||
384 | emotion_object_position_set(obj, 0.0); | 400 | emotion_object_position_set(obj, 0.0); |
385 | emotion_object_play_set(obj, 1); | 401 | emotion_object_play_set(obj, 1); |
386 | } | 402 | } |
403 | |||
404 | return EINA_TRUE; | ||
387 | } | 405 | } |
388 | 406 | ||
389 | static void | 407 | static Eina_Bool |
390 | video_obj_channels_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) | 408 | video_obj_channels_cb(void *data EINA_UNUSED, |
409 | Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
391 | { | 410 | { |
392 | printf("channels changed: [AUD %i][VID %i][SPU %i]\n", | 411 | printf("channels changed: [AUD %i][VID %i][SPU %i]\n", |
393 | emotion_object_audio_channel_count(obj), | 412 | emotion_object_audio_channel_count(obj), |
394 | emotion_object_video_channel_count(obj), | 413 | emotion_object_video_channel_count(obj), |
395 | emotion_object_spu_channel_count(obj)); | 414 | emotion_object_spu_channel_count(obj)); |
415 | |||
416 | return EINA_TRUE; | ||
396 | } | 417 | } |
397 | 418 | ||
398 | static void | 419 | static Eina_Bool |
399 | video_obj_title_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) | 420 | video_obj_title_cb(void *data EINA_UNUSED, |
421 | Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
400 | { | 422 | { |
401 | printf("video title to: \"%s\"\n", emotion_object_title_get(obj)); | 423 | printf("video title to: \"%s\"\n", emotion_object_title_get(obj)); |
424 | |||
425 | return EINA_TRUE; | ||
402 | } | 426 | } |
403 | 427 | ||
404 | static void | 428 | static Eina_Bool |
405 | video_obj_progress_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) | 429 | video_obj_progress_cb(void *data EINA_UNUSED, |
430 | Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
406 | { | 431 | { |
407 | printf("progress: \"%s\" %3.3f\n", | 432 | printf("progress: \"%s\" %3.3f\n", |
408 | emotion_object_progress_info_get(obj), | 433 | emotion_object_progress_info_get(obj), |
409 | emotion_object_progress_status_get(obj)); | 434 | emotion_object_progress_status_get(obj)); |
435 | |||
436 | return EINA_TRUE; | ||
410 | } | 437 | } |
411 | 438 | ||
412 | static void | 439 | static Eina_Bool |
413 | video_obj_ref_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) | 440 | video_obj_ref_cb(void *data EINA_UNUSED, |
441 | Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
414 | { | 442 | { |
415 | printf("video ref to: \"%s\" %i\n", | 443 | printf("video ref to: \"%s\" %i\n", |
416 | emotion_object_ref_file_get(obj), | 444 | emotion_object_ref_file_get(obj), |
417 | emotion_object_ref_num_get(obj)); | 445 | emotion_object_ref_num_get(obj)); |
446 | |||
447 | return EINA_TRUE; | ||
418 | } | 448 | } |
419 | 449 | ||
420 | static void | 450 | static Eina_Bool |
421 | video_obj_button_num_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) | 451 | video_obj_button_num_cb(void *data EINA_UNUSED, |
452 | Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
422 | { | 453 | { |
423 | printf("video spu buttons to: %i\n", | 454 | printf("video spu buttons to: %i\n", |
424 | emotion_object_spu_button_count_get(obj)); | 455 | emotion_object_spu_button_count_get(obj)); |
456 | |||
457 | return EINA_TRUE; | ||
425 | } | 458 | } |
426 | 459 | ||
427 | static void | 460 | static Eina_Bool |
428 | video_obj_button_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) | 461 | video_obj_button_cb(void *data EINA_UNUSED, |
462 | Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) | ||
429 | { | 463 | { |
430 | printf("video selected spu button: %i\n", | 464 | printf("video selected spu button: %i\n", |
431 | emotion_object_spu_button_get(obj)); | 465 | emotion_object_spu_button_get(obj)); |
432 | } | ||
433 | 466 | ||
467 | return EINA_TRUE; | ||
468 | } | ||
434 | 469 | ||
435 | static void | 470 | static void |
436 | video_obj_signal_play_cb(void *data, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED) | 471 | video_obj_signal_play_cb(void *data, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED) |
@@ -576,6 +611,20 @@ video_obj_signal_frame_move_cb(void *data EINA_UNUSED, Evas_Object *o, const cha | |||
576 | } | 611 | } |
577 | } | 612 | } |
578 | 613 | ||
614 | static const Eo_Callback_Array_Item emotion_object_test_callbacks[] = { | ||
615 | { EMOTION_OBJECT_EVENT_FRAME_DECODE, video_obj_frame_decode_cb }, | ||
616 | { EMOTION_OBJECT_EVENT_FRAME_RESIZE, video_obj_frame_resize_cb }, | ||
617 | { EMOTION_OBJECT_EVENT_LENGTH_CHANGE, video_obj_length_change_cb }, | ||
618 | { EMOTION_OBJECT_EVENT_POSITION_UPDATE, video_obj_position_update_cb }, | ||
619 | { EMOTION_OBJECT_EVENT_DECODE_STOP, video_obj_stopped_cb }, | ||
620 | { EMOTION_OBJECT_EVENT_CHANNELS_CHANGE, video_obj_channels_cb }, | ||
621 | { EMOTION_OBJECT_EVENT_TITLE_CHANGE, video_obj_title_cb }, | ||
622 | { EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, video_obj_progress_cb }, | ||
623 | { EMOTION_OBJECT_EVENT_REF_CHANGE, video_obj_ref_cb }, | ||
624 | { EMOTION_OBJECT_EVENT_BUTTON_NUM_CHANGE, video_obj_button_num_cb }, | ||
625 | { EMOTION_OBJECT_EVENT_BUTTON_CHANGE, video_obj_button_cb }, | ||
626 | { NULL, NULL } | ||
627 | }; | ||
579 | 628 | ||
580 | static void | 629 | static void |
581 | init_video_object(const char *module_filename, const char *filename) | 630 | init_video_object(const char *module_filename, const char *filename) |
@@ -621,18 +670,7 @@ init_video_object(const char *module_filename, const char *filename) | |||
621 | edje_object_size_min_calc(oe, &w, &h); | 670 | edje_object_size_min_calc(oe, &w, &h); |
622 | evas_object_resize(oe, w, h); | 671 | evas_object_resize(oe, w, h); |
623 | 672 | ||
624 | evas_object_smart_callback_add(o, "frame_decode", video_obj_frame_decode_cb, oe); | 673 | eo_do(o, eo_event_callback_array_add(emotion_object_test_callbacks, oe)); |
625 | evas_object_smart_callback_add(o, "frame_resize", video_obj_frame_resize_cb, oe); | ||
626 | evas_object_smart_callback_add(o, "length_change", video_obj_length_change_cb, oe); | ||
627 | evas_object_smart_callback_add(o, "position_update", video_obj_position_update_cb, oe); | ||
628 | |||
629 | evas_object_smart_callback_add(o, "decode_stop", video_obj_stopped_cb, oe); | ||
630 | evas_object_smart_callback_add(o, "channels_change", video_obj_channels_cb, oe); | ||
631 | evas_object_smart_callback_add(o, "title_change", video_obj_title_cb, oe); | ||
632 | evas_object_smart_callback_add(o, "progress_change", video_obj_progress_cb, oe); | ||
633 | evas_object_smart_callback_add(o, "ref_change", video_obj_ref_cb, oe); | ||
634 | evas_object_smart_callback_add(o, "button_num_change", video_obj_button_num_cb, oe); | ||
635 | evas_object_smart_callback_add(o, "button_change", video_obj_button_cb, oe); | ||
636 | 674 | ||
637 | edje_object_signal_callback_add(oe, "video_control", "play", video_obj_signal_play_cb, o); | 675 | edje_object_signal_callback_add(oe, "video_control", "play", video_obj_signal_play_cb, o); |
638 | edje_object_signal_callback_add(oe, "video_control", "pause", video_obj_signal_pause_cb, o); | 676 | edje_object_signal_callback_add(oe, "video_control", "pause", video_obj_signal_pause_cb, o); |