summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-09 17:16:19 +0000
committerTom Hacohen <tom@stosb.com>2016-03-09 17:16:19 +0000
commitd2fba6c5959f82f35984167131d3b67207780f48 (patch)
tree619d0f9834dcf37bb4e912dcf4da018f1097ba4e
parent6594ba0b6df9ba72f031a00d0e8ba3b23cf2c0b2 (diff)
Fix examples according to the recent eo event changes.
Diffstat (limited to '')
-rw-r--r--src/examples/eldbus/dbusmodel.c22
-rw-r--r--src/examples/emotion/emotion_basic_example.c3
-rw-r--r--src/examples/emotion/emotion_border_example.c28
-rw-r--r--src/examples/emotion/emotion_generic_example.c30
-rw-r--r--src/examples/emotion/emotion_generic_subtitle_example.c3
-rw-r--r--src/examples/emotion/emotion_signals_example.c39
6 files changed, 50 insertions, 75 deletions
diff --git a/src/examples/eldbus/dbusmodel.c b/src/examples/eldbus/dbusmodel.c
index 3e4063e..ec37309 100644
--- a/src/examples/eldbus/dbusmodel.c
+++ b/src/examples/eldbus/dbusmodel.c
@@ -14,11 +14,9 @@
14static unsigned int children_count = 0; 14static unsigned int children_count = 0;
15 15
16static Eina_Bool 16static Eina_Bool
17_event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model, 17_event_interface_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
18 const Eo_Event_Description *desc EINA_UNUSED,
19 void *event_info)
20{ 18{
21 Efl_Model_Load *actual_load = (Efl_Model_Load*)event_info; 19 Efl_Model_Load *actual_load = (Efl_Model_Load*)event->event_info;
22 Eina_Array *properties_list; 20 Eina_Array *properties_list;
23 Eina_Array_Iterator iterator; 21 Eina_Array_Iterator iterator;
24 Eina_Value const* property_value; 22 Eina_Value const* property_value;
@@ -29,8 +27,8 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model,
29 if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status) 27 if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
30 return EINA_TRUE; 28 return EINA_TRUE;
31 29
32 name = eldbus_model_proxy_name_get(model); 30 name = eldbus_model_proxy_name_get(event->obj);
33 efl_model_properties_get(model, &properties_list); 31 efl_model_properties_get(event->obj, &properties_list);
34 32
35 printf(" -> %s\n", name); 33 printf(" -> %s\n", name);
36 if (eina_array_count(properties_list)) 34 if (eina_array_count(properties_list))
@@ -38,7 +36,7 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model,
38 36
39 EINA_ARRAY_ITER_NEXT(properties_list, i, property, iterator) 37 EINA_ARRAY_ITER_NEXT(properties_list, i, property, iterator)
40 { 38 {
41 efl_model_property_get(model, property, &property_value); 39 efl_model_property_get(event->obj, property, &property_value);
42 if (property_value) 40 if (property_value)
43 { 41 {
44 prop_str = eina_value_to_string(property_value); 42 prop_str = eina_value_to_string(property_value);
@@ -57,11 +55,9 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model,
57} 55}
58 56
59static Eina_Bool 57static Eina_Bool
60_event_load_status_cb(void *data EINA_UNUSED, Eo *model, 58_event_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
61 const Eo_Event_Description *desc EINA_UNUSED,
62 void *event_info)
63{ 59{
64 Efl_Model_Load *actual_load = (Efl_Model_Load*)event_info; 60 Efl_Model_Load *actual_load = (Efl_Model_Load*)event->event_info;
65 Eina_Accessor *accessor; 61 Eina_Accessor *accessor;
66 Eo *child = NULL; 62 Eo *child = NULL;
67 unsigned int i; 63 unsigned int i;
@@ -69,7 +65,7 @@ _event_load_status_cb(void *data EINA_UNUSED, Eo *model,
69 if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status) 65 if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
70 return EINA_TRUE; 66 return EINA_TRUE;
71 67
72 efl_model_children_count_get(model, &children_count); 68 efl_model_children_count_get(event->obj, &children_count);
73 if (children_count == 0) 69 if (children_count == 0)
74 { 70 {
75 printf("Don't find Interfaces\n"); 71 printf("Don't find Interfaces\n");
@@ -77,7 +73,7 @@ _event_load_status_cb(void *data EINA_UNUSED, Eo *model,
77 return EINA_FALSE; 73 return EINA_FALSE;
78 } 74 }
79 75
80 efl_model_children_slice_get(model, 0, 0, &accessor); 76 efl_model_children_slice_get(event->obj, 0, 0, &accessor);
81 printf("\nInterfaces:\n"); 77 printf("\nInterfaces:\n");
82 EINA_ACCESSOR_FOREACH(accessor, i, child) 78 EINA_ACCESSOR_FOREACH(accessor, i, child)
83 { 79 {
diff --git a/src/examples/emotion/emotion_basic_example.c b/src/examples/emotion/emotion_basic_example.c
index 9675f6b..9ad3575 100644
--- a/src/examples/emotion/emotion_basic_example.c
+++ b/src/examples/emotion/emotion_basic_example.c
@@ -15,8 +15,7 @@
15#define HEIGHT (240) 15#define HEIGHT (240)
16 16
17static Eina_Bool 17static Eina_Bool
18_playback_started_cb(void *data EINA_UNUSED, 18_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
19 Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
20{ 19{
21 printf("Emotion object started playback.\n"); 20 printf("Emotion object started playback.\n");
22 21
diff --git a/src/examples/emotion/emotion_border_example.c b/src/examples/emotion/emotion_border_example.c
index ea3c07d..f422fbe 100644
--- a/src/examples/emotion/emotion_border_example.c
+++ b/src/examples/emotion/emotion_border_example.c
@@ -18,8 +18,7 @@ static Eina_List *filenames = NULL;
18static Eina_List *curfile = NULL; 18static Eina_List *curfile = NULL;
19 19
20static Eina_Bool 20static Eina_Bool
21_playback_started_cb(void *data EINA_UNUSED, 21_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
22 Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
23{ 22{
24 printf("Emotion object started playback.\n"); 23 printf("Emotion object started playback.\n");
25 24
@@ -109,8 +108,7 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *
109} 108}
110 109
111static Eina_Bool 110static Eina_Bool
112_frame_decode_cb(void *data EINA_UNUSED, 111_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
113 Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
114{ 112{
115 // fprintf(stderr, "smartcb: frame_decode\n"); 113 // fprintf(stderr, "smartcb: frame_decode\n");
116 114
@@ -118,40 +116,36 @@ _frame_decode_cb(void *data EINA_UNUSED,
118} 116}
119 117
120static Eina_Bool 118static Eina_Bool
121_length_change_cb(void *data EINA_UNUSED, 119_length_change_cb(void *data EINA_UNUSED, const Eo_Event *event)
122 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
123{ 120{
124 fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(o)); 121 fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(event->obj));
125 122
126 return EINA_TRUE; 123 return EINA_TRUE;
127} 124}
128 125
129static Eina_Bool 126static Eina_Bool
130_position_update_cb(void *data EINA_UNUSED, 127_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event)
131 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
132{ 128{
133 fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(o)); 129 fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(event->obj));
134 130
135 return EINA_TRUE; 131 return EINA_TRUE;
136} 132}
137 133
138static Eina_Bool 134static Eina_Bool
139_progress_change_cb(void *data EINA_UNUSED, 135_progress_change_cb(void *data EINA_UNUSED, const Eo_Event *event)
140 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
141{ 136{
142 fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n", 137 fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n",
143 emotion_object_progress_status_get(o), 138 emotion_object_progress_status_get(event->obj),
144 emotion_object_progress_info_get(o)); 139 emotion_object_progress_info_get(event->obj));
145 140
146 return EINA_TRUE; 141 return EINA_TRUE;
147} 142}
148 143
149static Eina_Bool 144static Eina_Bool
150_frame_resize_cb(void *data EINA_UNUSED, 145_frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *event)
151 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
152{ 146{
153 int w, h; 147 int w, h;
154 emotion_object_size_get(o, &w, &h); 148 emotion_object_size_get(event->obj, &w, &h);
155 fprintf(stderr, "smartcb: frame_resize: %dx%d\n", w, h); 149 fprintf(stderr, "smartcb: frame_resize: %dx%d\n", w, h);
156 150
157 return EINA_TRUE; 151 return EINA_TRUE;
diff --git a/src/examples/emotion/emotion_generic_example.c b/src/examples/emotion/emotion_generic_example.c
index cdbfe6e..15059fc 100644
--- a/src/examples/emotion/emotion_generic_example.c
+++ b/src/examples/emotion/emotion_generic_example.c
@@ -19,8 +19,7 @@ static Eina_List *filenames = NULL;
19static Eina_List *curfile = NULL; 19static Eina_List *curfile = NULL;
20 20
21static Eina_Bool 21static Eina_Bool
22_playback_started_cb(void *data EINA_UNUSED, 22_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
23 Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
24{ 23{
25 printf("Emotion object started playback.\n"); 24 printf("Emotion object started playback.\n");
26 25
@@ -28,12 +27,11 @@ _playback_started_cb(void *data EINA_UNUSED,
28} 27}
29 28
30static Eina_Bool 29static Eina_Bool
31_playback_stopped_cb(void *data EINA_UNUSED, 30_playback_stopped_cb(void *data EINA_UNUSED, const Eo_Event *event)
32 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
33{ 31{
34 printf("Emotion playback stopped.\n"); 32 printf("Emotion playback stopped.\n");
35 emotion_object_play_set(o, EINA_FALSE); 33 emotion_object_play_set(event->obj, EINA_FALSE);
36 emotion_object_position_set(o, 0); 34 emotion_object_position_set(event->obj, 0);
37 35
38 return EINA_TRUE; 36 return EINA_TRUE;
39} 37}
@@ -133,8 +131,7 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *
133} 131}
134 132
135static Eina_Bool 133static Eina_Bool
136_frame_decode_cb(void *data EINA_UNUSED, 134_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
137 Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
138{ 135{
139 // fprintf(stderr, "smartcb: frame_decode\n"); 136 // fprintf(stderr, "smartcb: frame_decode\n");
140 137
@@ -142,30 +139,27 @@ _frame_decode_cb(void *data EINA_UNUSED,
142} 139}
143 140
144static Eina_Bool 141static Eina_Bool
145_length_change_cb(void *data EINA_UNUSED, 142_length_change_cb(void *data EINA_UNUSED, const Eo_Event *event)
146 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
147{ 143{
148 fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(o)); 144 fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(event->obj));
149 145
150 return EINA_TRUE; 146 return EINA_TRUE;
151} 147}
152 148
153static Eina_Bool 149static Eina_Bool
154_position_update_cb(void *data EINA_UNUSED, 150_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event)
155 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
156{ 151{
157 fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(o)); 152 fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(event->obj));
158 153
159 return EINA_TRUE; 154 return EINA_TRUE;
160} 155}
161 156
162static Eina_Bool 157static Eina_Bool
163_progress_change_cb(void *data EINA_UNUSED, 158_progress_change_cb(void *data EINA_UNUSED, const Eo_Event *event)
164 Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
165{ 159{
166 fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n", 160 fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n",
167 emotion_object_progress_status_get(obj), 161 emotion_object_progress_status_get(event->obj),
168 emotion_object_progress_info_get(obj)); 162 emotion_object_progress_info_get(event->obj));
169 163
170 return EINA_TRUE; 164 return EINA_TRUE;
171} 165}
diff --git a/src/examples/emotion/emotion_generic_subtitle_example.c b/src/examples/emotion/emotion_generic_subtitle_example.c
index 1d32f77..1ecdf8b 100644
--- a/src/examples/emotion/emotion_generic_subtitle_example.c
+++ b/src/examples/emotion/emotion_generic_subtitle_example.c
@@ -14,8 +14,7 @@
14#define HEIGHT (240) 14#define HEIGHT (240)
15 15
16static Eina_Bool 16static Eina_Bool
17_playback_started_cb(void *data EINA_UNUSED, 17_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
18 Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
19{ 18{
20 printf("Emotion object started playback.\n"); 19 printf("Emotion object started playback.\n");
21 20
diff --git a/src/examples/emotion/emotion_signals_example.c b/src/examples/emotion/emotion_signals_example.c
index b84c47d..8cf620d 100644
--- a/src/examples/emotion/emotion_signals_example.c
+++ b/src/examples/emotion/emotion_signals_example.c
@@ -34,73 +34,66 @@ _display_info(Evas_Object *o)
34} 34}
35 35
36static Eina_Bool 36static Eina_Bool
37_playback_started_cb(void *data EINA_UNUSED, 37_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event)
38 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
39{ 38{
40 printf(">>> Emotion object started playback.\n"); 39 printf(">>> Emotion object started playback.\n");
41 _display_info(o); 40 _display_info(event->obj);
42 41
43 return EINA_TRUE; 42 return EINA_TRUE;
44} 43}
45 44
46static Eina_Bool 45static Eina_Bool
47_playback_finished_cb(void *data EINA_UNUSED, 46_playback_finished_cb(void *data EINA_UNUSED, const Eo_Event *event)
48 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
49{ 47{
50 printf(">>> Emotion object finished playback.\n"); 48 printf(">>> Emotion object finished playback.\n");
51 _display_info(o); 49 _display_info(event->obj);
52 50
53 return EINA_TRUE; 51 return EINA_TRUE;
54} 52}
55 53
56static Eina_Bool 54static Eina_Bool
57_open_done_cb(void *data EINA_UNUSED, 55_open_done_cb(void *data EINA_UNUSED, const Eo_Event *event)
58 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
59{ 56{
60 printf(">>> Emotion object open done.\n"); 57 printf(">>> Emotion object open done.\n");
61 _display_info(o); 58 _display_info(event->obj);
62 59
63 return EINA_TRUE; 60 return EINA_TRUE;
64} 61}
65 62
66static Eina_Bool 63static Eina_Bool
67_position_update_cb(void *data EINA_UNUSED, 64_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event)
68 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
69{ 65{
70 printf(">>> Emotion object first position update.\n"); 66 printf(">>> Emotion object first position update.\n");
71 eo_event_callback_del(o, EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb, NULL); 67 eo_event_callback_del(event->obj, EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb, NULL);
72 _display_info(o); 68 _display_info(event->obj);
73 69
74 return EINA_TRUE; 70 return EINA_TRUE;
75} 71}
76 72
77static Eina_Bool 73static Eina_Bool
78_frame_decode_cb(void *data EINA_UNUSED, 74_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event)
79 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
80{ 75{
81 printf(">>> Emotion object first frame decode.\n"); 76 printf(">>> Emotion object first frame decode.\n");
82 eo_event_callback_del(o, EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb, NULL); 77 eo_event_callback_del(event->obj, EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb, NULL);
83 _display_info(o); 78 _display_info(event->obj);
84 79
85 return EINA_TRUE; 80 return EINA_TRUE;
86} 81}
87 82
88static Eina_Bool 83static Eina_Bool
89_decode_stop_cb(void *data EINA_UNUSED, 84_decode_stop_cb(void *data EINA_UNUSED, const Eo_Event *event)
90 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
91{ 85{
92 printf(">>> Emotion object decode stop.\n"); 86 printf(">>> Emotion object decode stop.\n");
93 _display_info(o); 87 _display_info(event->obj);
94 88
95 return EINA_TRUE; 89 return EINA_TRUE;
96} 90}
97 91
98static Eina_Bool 92static Eina_Bool
99_frame_resize_cb(void *data EINA_UNUSED, 93_frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *event)
100 Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
101{ 94{
102 printf(">>> Emotion object frame resize.\n"); 95 printf(">>> Emotion object frame resize.\n");
103 _display_info(o); 96 _display_info(event->obj);
104 97
105 return EINA_TRUE; 98 return EINA_TRUE;
106} 99}