summaryrefslogtreecommitdiff
path: root/src/examples/emotion
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-06-20 15:31:31 +0100
committerTom Hacohen <tom@stosb.com>2016-06-20 18:02:00 +0100
commit6202cc7485a54dea6f02a2668e7c907247902dd1 (patch)
tree7a1fa2b61175b1ef75a9bff7299a0ce3daa45216 /src/examples/emotion
parentd648eb5311585f7392d0290640ba133814b52589 (diff)
Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
Diffstat (limited to 'src/examples/emotion')
-rw-r--r--src/examples/emotion/emotion_basic_example.c4
-rw-r--r--src/examples/emotion/emotion_border_example.c24
-rw-r--r--src/examples/emotion/emotion_generic_example.c24
-rw-r--r--src/examples/emotion/emotion_generic_subtitle_example.c4
-rw-r--r--src/examples/emotion/emotion_signals_example.c28
5 files changed, 21 insertions, 63 deletions
diff --git a/src/examples/emotion/emotion_basic_example.c b/src/examples/emotion/emotion_basic_example.c
index 7b6ce43..7f14486 100644
--- a/src/examples/emotion/emotion_basic_example.c
+++ b/src/examples/emotion/emotion_basic_example.c
@@ -14,12 +14,10 @@
14#define WIDTH (320) 14#define WIDTH (320)
15#define HEIGHT (240) 15#define HEIGHT (240)
16 16
17static Eina_Bool 17static void
18_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *ev EINA_UNUSED) 18_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *ev EINA_UNUSED)
19{ 19{
20 printf("Emotion object started playback.\n"); 20 printf("Emotion object started playback.\n");
21
22 return EINA_TRUE;
23} 21}
24 22
25int 23int
diff --git a/src/examples/emotion/emotion_border_example.c b/src/examples/emotion/emotion_border_example.c
index 67c43a9..e106a11 100644
--- a/src/examples/emotion/emotion_border_example.c
+++ b/src/examples/emotion/emotion_border_example.c
@@ -17,12 +17,10 @@
17static Eina_List *filenames = NULL; 17static Eina_List *filenames = NULL;
18static Eina_List *curfile = NULL; 18static Eina_List *curfile = NULL;
19 19
20static Eina_Bool 20static void
21_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *ev EINA_UNUSED) 21_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *ev EINA_UNUSED)
22{ 22{
23 printf("Emotion object started playback.\n"); 23 printf("Emotion object started playback.\n");
24
25 return EINA_TRUE;
26} 24}
27 25
28static Evas_Object * 26static Evas_Object *
@@ -107,48 +105,38 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *
107 } 105 }
108} 106}
109 107
110static Eina_Bool 108static void
111_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *ev EINA_UNUSED) 109_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *ev EINA_UNUSED)
112{ 110{
113 // fprintf(stderr, "smartcb: frame_decode\n"); 111 // fprintf(stderr, "smartcb: frame_decode\n");
114
115 return EINA_TRUE;
116} 112}
117 113
118static Eina_Bool 114static void
119_length_change_cb(void *data EINA_UNUSED, const Eo_Event *ev) 115_length_change_cb(void *data EINA_UNUSED, const Eo_Event *ev)
120{ 116{
121 fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(ev->object)); 117 fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(ev->object));
122
123 return EINA_TRUE;
124} 118}
125 119
126static Eina_Bool 120static void
127_position_update_cb(void *data EINA_UNUSED, const Eo_Event *ev) 121_position_update_cb(void *data EINA_UNUSED, const Eo_Event *ev)
128{ 122{
129 fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(ev->object)); 123 fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(ev->object));
130
131 return EINA_TRUE;
132} 124}
133 125
134static Eina_Bool 126static void
135_progress_change_cb(void *data EINA_UNUSED, const Eo_Event *ev) 127_progress_change_cb(void *data EINA_UNUSED, const Eo_Event *ev)
136{ 128{
137 fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n", 129 fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n",
138 emotion_object_progress_status_get(ev->object), 130 emotion_object_progress_status_get(ev->object),
139 emotion_object_progress_info_get(ev->object)); 131 emotion_object_progress_info_get(ev->object));
140
141 return EINA_TRUE;
142} 132}
143 133
144static Eina_Bool 134static void
145_frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *ev) 135_frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *ev)
146{ 136{
147 int w, h; 137 int w, h;
148 emotion_object_size_get(ev->object, &w, &h); 138 emotion_object_size_get(ev->object, &w, &h);
149 fprintf(stderr, "smartcb: frame_resize: %dx%d\n", w, h); 139 fprintf(stderr, "smartcb: frame_resize: %dx%d\n", w, h);
150
151 return EINA_TRUE;
152} 140}
153 141
154static void /* adjust canvas' contents on resizes */ 142static void /* adjust canvas' contents on resizes */
diff --git a/src/examples/emotion/emotion_generic_example.c b/src/examples/emotion/emotion_generic_example.c
index f0d7fab..f7afeba 100644
--- a/src/examples/emotion/emotion_generic_example.c
+++ b/src/examples/emotion/emotion_generic_example.c
@@ -18,22 +18,18 @@
18static Eina_List *filenames = NULL; 18static Eina_List *filenames = NULL;
19static Eina_List *curfile = NULL; 19static Eina_List *curfile = NULL;
20 20
21static Eina_Bool 21static void
22_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *ev EINA_UNUSED) 22_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *ev EINA_UNUSED)
23{ 23{
24 printf("Emotion object started playback.\n"); 24 printf("Emotion object started playback.\n");
25
26 return EINA_TRUE;
27} 25}
28 26
29static Eina_Bool 27static void
30_playback_stopped_cb(void *data EINA_UNUSED, const Eo_Event *ev) 28_playback_stopped_cb(void *data EINA_UNUSED, const Eo_Event *ev)
31{ 29{
32 printf("Emotion playback stopped.\n"); 30 printf("Emotion playback stopped.\n");
33 emotion_object_play_set(ev->object, EINA_FALSE); 31 emotion_object_play_set(ev->object, EINA_FALSE);
34 emotion_object_position_set(ev->object, 0); 32 emotion_object_position_set(ev->object, 0);
35
36 return EINA_TRUE;
37} 33}
38 34
39static Evas_Object * 35static Evas_Object *
@@ -130,38 +126,30 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *
130 } 126 }
131} 127}
132 128
133static Eina_Bool 129static void
134_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *ev EINA_UNUSED) 130_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *ev EINA_UNUSED)
135{ 131{
136 // fprintf(stderr, "smartcb: frame_decode\n"); 132 // fprintf(stderr, "smartcb: frame_decode\n");
137
138 return EINA_TRUE;
139} 133}
140 134
141static Eina_Bool 135static void
142_length_change_cb(void *data EINA_UNUSED, const Eo_Event *ev) 136_length_change_cb(void *data EINA_UNUSED, const Eo_Event *ev)
143{ 137{
144 fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(ev->object)); 138 fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(ev->object));
145
146 return EINA_TRUE;
147} 139}
148 140
149static Eina_Bool 141static void
150_position_update_cb(void *data EINA_UNUSED, const Eo_Event *ev) 142_position_update_cb(void *data EINA_UNUSED, const Eo_Event *ev)
151{ 143{
152 fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(ev->object)); 144 fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(ev->object));
153
154 return EINA_TRUE;
155} 145}
156 146
157static Eina_Bool 147static void
158_progress_change_cb(void *data EINA_UNUSED, const Eo_Event *ev) 148_progress_change_cb(void *data EINA_UNUSED, const Eo_Event *ev)
159{ 149{
160 fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n", 150 fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n",
161 emotion_object_progress_status_get(ev->object), 151 emotion_object_progress_status_get(ev->object),
162 emotion_object_progress_info_get(ev->object)); 152 emotion_object_progress_info_get(ev->object));
163
164 return EINA_TRUE;
165} 153}
166 154
167EO_CALLBACKS_ARRAY_DEFINE(emotion_object_example_callbacks, 155EO_CALLBACKS_ARRAY_DEFINE(emotion_object_example_callbacks,
diff --git a/src/examples/emotion/emotion_generic_subtitle_example.c b/src/examples/emotion/emotion_generic_subtitle_example.c
index 5246916..8bfa151 100644
--- a/src/examples/emotion/emotion_generic_subtitle_example.c
+++ b/src/examples/emotion/emotion_generic_subtitle_example.c
@@ -13,12 +13,10 @@
13#define WIDTH (320) 13#define WIDTH (320)
14#define HEIGHT (240) 14#define HEIGHT (240)
15 15
16static Eina_Bool 16static void
17_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *ev EINA_UNUSED) 17_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *ev EINA_UNUSED)
18{ 18{
19 printf("Emotion object started playback.\n"); 19 printf("Emotion object started playback.\n");
20
21 return EINA_TRUE;
22} 20}
23 21
24static void 22static void
diff --git a/src/examples/emotion/emotion_signals_example.c b/src/examples/emotion/emotion_signals_example.c
index ecf30a7..aae1063 100644
--- a/src/examples/emotion/emotion_signals_example.c
+++ b/src/examples/emotion/emotion_signals_example.c
@@ -33,69 +33,55 @@ _display_info(Evas_Object *o)
33 printf("\n"); 33 printf("\n");
34} 34}
35 35
36static Eina_Bool 36static void
37_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *ev) 37_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *ev)
38{ 38{
39 printf(">>> Emotion object started playback.\n"); 39 printf(">>> Emotion object started playback.\n");
40 _display_info(ev->object); 40 _display_info(ev->object);
41
42 return EINA_TRUE;
43} 41}
44 42
45static Eina_Bool 43static void
46_playback_finished_cb(void *data EINA_UNUSED, const Eo_Event *ev) 44_playback_finished_cb(void *data EINA_UNUSED, const Eo_Event *ev)
47{ 45{
48 printf(">>> Emotion object finished playback.\n"); 46 printf(">>> Emotion object finished playback.\n");
49 _display_info(ev->object); 47 _display_info(ev->object);
50
51 return EINA_TRUE;
52} 48}
53 49
54static Eina_Bool 50static void
55_open_done_cb(void *data EINA_UNUSED, const Eo_Event *ev) 51_open_done_cb(void *data EINA_UNUSED, const Eo_Event *ev)
56{ 52{
57 printf(">>> Emotion object open done.\n"); 53 printf(">>> Emotion object open done.\n");
58 _display_info(ev->object); 54 _display_info(ev->object);
59
60 return EINA_TRUE;
61} 55}
62 56
63static Eina_Bool 57static void
64_position_update_cb(void *data EINA_UNUSED, const Eo_Event *ev) 58_position_update_cb(void *data EINA_UNUSED, const Eo_Event *ev)
65{ 59{
66 printf(">>> Emotion object first position update.\n"); 60 printf(">>> Emotion object first position update.\n");
67 eo_event_callback_del(ev->object, EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb, NULL); 61 eo_event_callback_del(ev->object, EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb, NULL);
68 _display_info(ev->object); 62 _display_info(ev->object);
69
70 return EINA_TRUE;
71} 63}
72 64
73static Eina_Bool 65static void
74_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *ev) 66_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *ev)
75{ 67{
76 printf(">>> Emotion object first frame decode.\n"); 68 printf(">>> Emotion object first frame decode.\n");
77 eo_event_callback_del(ev->object, EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb, NULL); 69 eo_event_callback_del(ev->object, EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb, NULL);
78 _display_info(ev->object); 70 _display_info(ev->object);
79
80 return EINA_TRUE;
81} 71}
82 72
83static Eina_Bool 73static void
84_decode_stop_cb(void *data EINA_UNUSED, const Eo_Event *ev) 74_decode_stop_cb(void *data EINA_UNUSED, const Eo_Event *ev)
85{ 75{
86 printf(">>> Emotion object decode stop.\n"); 76 printf(">>> Emotion object decode stop.\n");
87 _display_info(ev->object); 77 _display_info(ev->object);
88
89 return EINA_TRUE;
90} 78}
91 79
92static Eina_Bool 80static void
93_frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *ev) 81_frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *ev)
94{ 82{
95 printf(">>> Emotion object frame resize.\n"); 83 printf(">>> Emotion object frame resize.\n");
96 _display_info(ev->object); 84 _display_info(ev->object);
97
98 return EINA_TRUE;
99} 85}
100 86
101static void 87static void