summaryrefslogtreecommitdiff
path: root/src/examples
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
parentd648eb5311585f7392d0290640ba133814b52589 (diff)
Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/ecore/ecore_audio_playback.c2
-rw-r--r--src/examples/ecore/ecore_audio_to_ogg.c2
-rw-r--r--src/examples/eio/eio_sentry.c4
-rw-r--r--src/examples/elementary/filemvc.c6
-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
-rw-r--r--src/examples/evas/evas-3d-shadows.c8
10 files changed, 29 insertions, 77 deletions
diff --git a/src/examples/ecore/ecore_audio_playback.c b/src/examples/ecore/ecore_audio_playback.c
index 29be761..0b1ea08 100644
--- a/src/examples/ecore/ecore_audio_playback.c
+++ b/src/examples/ecore/ecore_audio_playback.c
@@ -191,7 +191,7 @@ handle_input(void *data EINA_UNUSED, Ecore_Fd_Handler *handler)
191 return EINA_TRUE; 191 return EINA_TRUE;
192} 192}
193 193
194static Eina_Bool _play_finished(void *data EINA_UNUSED, const Eo_Event *event) 194static void _play_finished(void *data EINA_UNUSED, const Eo_Event *event)
195{ 195{
196 const char *name; 196 const char *name;
197 Eina_Bool ret; 197 Eina_Bool ret;
diff --git a/src/examples/ecore/ecore_audio_to_ogg.c b/src/examples/ecore/ecore_audio_to_ogg.c
index a9451ea..2e1e92c 100644
--- a/src/examples/ecore/ecore_audio_to_ogg.c
+++ b/src/examples/ecore/ecore_audio_to_ogg.c
@@ -15,7 +15,7 @@
15double volume = 1; 15double volume = 1;
16Eina_List *inputs = NULL; 16Eina_List *inputs = NULL;
17 17
18static Eina_Bool _play_finished(void *data EINA_UNUSED, const Eo_Event *event) 18static void _play_finished(void *data EINA_UNUSED, const Eo_Event *event)
19{ 19{
20 const char *name; 20 const char *name;
21 Eo *out; 21 Eo *out;
diff --git a/src/examples/eio/eio_sentry.c b/src/examples/eio/eio_sentry.c
index f48ee46..2952902 100644
--- a/src/examples/eio/eio_sentry.c
+++ b/src/examples/eio/eio_sentry.c
@@ -10,7 +10,7 @@
10#include <Eio.h> 10#include <Eio.h>
11#include <Ecore.h> 11#include <Ecore.h>
12 12
13Eina_Bool 13void
14sentry_cb(void *data EINA_UNUSED, const Eo_Event *event) 14sentry_cb(void *data EINA_UNUSED, const Eo_Event *event)
15{ 15{
16 Eio_Sentry_Event *event_info = event->info; 16 Eio_Sentry_Event *event_info = event->info;
@@ -20,7 +20,7 @@ sentry_cb(void *data EINA_UNUSED, const Eo_Event *event)
20 20
21 ecore_main_loop_quit(); 21 ecore_main_loop_quit();
22 22
23 return EINA_FALSE; 23 eo_event_callback_stop(event->object);
24} 24}
25 25
26void 26void
diff --git a/src/examples/elementary/filemvc.c b/src/examples/elementary/filemvc.c
index f4d7890..0995021 100644
--- a/src/examples/elementary/filemvc.c
+++ b/src/examples/elementary/filemvc.c
@@ -46,7 +46,7 @@ _filter_cb(void *data EINA_UNUSED, Eio_File *handler EINA_UNUSED, const Eina_Fil
46 return EINA_FALSE; 46 return EINA_FALSE;
47} 47}
48 48
49static Eina_Bool 49static void
50_list_selected_cb(void *data EINA_UNUSED, const Eo_Event *event) 50_list_selected_cb(void *data EINA_UNUSED, const Eo_Event *event)
51{ 51{
52 Efl_Model_Test_Filemvc_Data *priv = data; 52 Efl_Model_Test_Filemvc_Data *priv = data;
@@ -55,7 +55,6 @@ _list_selected_cb(void *data EINA_UNUSED, const Eo_Event *event)
55 55
56 printf("LIST selected model\n"); 56 printf("LIST selected model\n");
57 elm_view_form_model_set(priv->formview, child); 57 elm_view_form_model_set(priv->formview, child);
58 return EINA_TRUE;
59} 58}
60 59
61static void 60static void
@@ -75,7 +74,7 @@ _promise_error(void *data, const Eina_Error err)
75{ 74{
76} 75}
77 76
78static Eina_Bool 77static void
79_tree_selected_cb(void *data, const Eo_Event *event) 78_tree_selected_cb(void *data, const Eo_Event *event)
80{ 79{
81 Efl_Model_Test_Filemvc_Data *priv = data; 80 Efl_Model_Test_Filemvc_Data *priv = data;
@@ -86,7 +85,6 @@ _tree_selected_cb(void *data, const Eo_Event *event)
86 85
87 promise= efl_model_property_get(child, "path"); 86 promise= efl_model_property_get(child, "path");
88 eina_promise_then(promise, &_promise_then, &_promise_error, priv); 87 eina_promise_then(promise, &_promise_then, &_promise_error, priv);
89 return EINA_TRUE;
90} 88}
91 89
92static void 90static void
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
diff --git a/src/examples/evas/evas-3d-shadows.c b/src/examples/evas/evas-3d-shadows.c
index 67b0221..e7782f0 100644
--- a/src/examples/evas/evas-3d-shadows.c
+++ b/src/examples/evas/evas-3d-shadows.c
@@ -88,7 +88,7 @@ typedef struct _Scene_Data
88 Eina_Bool init; 88 Eina_Bool init;
89} Scene_Data; 89} Scene_Data;
90 90
91Eina_Bool 91void
92_cb_clicked(void *data EINA_UNUSED, const Eo_Event *event) 92_cb_clicked(void *data EINA_UNUSED, const Eo_Event *event)
93{ 93{
94 Eina_List *meshes = NULL, *l; 94 Eina_List *meshes = NULL, *l;
@@ -112,11 +112,9 @@ _cb_clicked(void *data EINA_UNUSED, const Eo_Event *event)
112 } 112 }
113 choosed_node = (Evas_Canvas3D_Node *)event->info; 113 choosed_node = (Evas_Canvas3D_Node *)event->info;
114 } 114 }
115
116 return EINA_TRUE;
117} 115}
118 116
119Eina_Bool 117void
120_cb_collision(void *data EINA_UNUSED, const Eo_Event *event) 118_cb_collision(void *data EINA_UNUSED, const Eo_Event *event)
121{ 119{
122 Eina_List *meshes = NULL, *l; 120 Eina_List *meshes = NULL, *l;
@@ -126,8 +124,6 @@ _cb_collision(void *data EINA_UNUSED, const Eo_Event *event)
126 { 124 {
127 evas_canvas3d_mesh_shader_mode_set(m, EVAS_CANVAS3D_SHADER_MODE_DIFFUSE); 125 evas_canvas3d_mesh_shader_mode_set(m, EVAS_CANVAS3D_SHADER_MODE_DIFFUSE);
128 } 126 }
129
130 return EINA_TRUE;
131} 127}
132 128
133static void 129static void