summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_callbacks.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_callbacks.c')
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index 14e303f..82b8105 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -17,15 +17,15 @@ extern Eina_Hash* signals_hash_table;
17 * Evas events descriptions for Eo. 17 * Evas events descriptions for Eo.
18 */ 18 */
19#define DEFINE_EVAS_CALLBACKS(LAST, ...) \ 19#define DEFINE_EVAS_CALLBACKS(LAST, ...) \
20 static const Eo_Event_Description *_legacy_evas_callback_table(unsigned int index) \ 20 static const Efl_Event_Description *_legacy_evas_callback_table(unsigned int index) \
21 { \ 21 { \
22 static const Eo_Event_Description *internals[LAST] = { NULL }; \ 22 static const Efl_Event_Description *internals[LAST] = { NULL }; \
23 \ 23 \
24 if (internals[0] == NULL) \ 24 if (internals[0] == NULL) \
25 { \ 25 { \
26 memcpy(internals, \ 26 memcpy(internals, \
27 ((const Eo_Event_Description*[]) { __VA_ARGS__ }), \ 27 ((const Efl_Event_Description*[]) { __VA_ARGS__ }), \
28 sizeof ((const Eo_Event_Description *[]) { __VA_ARGS__ })); \ 28 sizeof ((const Efl_Event_Description *[]) { __VA_ARGS__ })); \
29 } \ 29 } \
30 return internals[index]; \ 30 return internals[index]; \
31 } 31 }
@@ -145,7 +145,7 @@ evas_object_event_callback_all_del(Evas_Object *eo_obj)
145 if (!obj->callbacks) return; 145 if (!obj->callbacks) return;
146 EINA_INLIST_FOREACH_SAFE(obj->callbacks, itr, info) 146 EINA_INLIST_FOREACH_SAFE(obj->callbacks, itr, info)
147 { 147 {
148 eo_event_callback_del(eo_obj, _legacy_evas_callback_table(info->type), _eo_evas_object_cb, info); 148 efl_event_callback_del(eo_obj, _legacy_evas_callback_table(info->type), _eo_evas_object_cb, info);
149 149
150 obj->callbacks = 150 obj->callbacks =
151 eina_inlist_remove(obj->callbacks, EINA_INLIST_GET(info)); 151 eina_inlist_remove(obj->callbacks, EINA_INLIST_GET(info));
@@ -171,7 +171,7 @@ evas_event_callback_all_del(Evas *eo_e)
171 171
172 EINA_INLIST_FOREACH_SAFE(e->callbacks, itr, info) 172 EINA_INLIST_FOREACH_SAFE(e->callbacks, itr, info)
173 { 173 {
174 eo_event_callback_del(eo_e, _legacy_evas_callback_table(info->type), _eo_evas_cb, info); 174 efl_event_callback_del(eo_e, _legacy_evas_callback_table(info->type), _eo_evas_cb, info);
175 175
176 e->callbacks = 176 e->callbacks =
177 eina_inlist_remove(e->callbacks, EINA_INLIST_GET(info)); 177 eina_inlist_remove(e->callbacks, EINA_INLIST_GET(info));
@@ -188,13 +188,13 @@ evas_event_callback_cleanup(Evas *eo_e)
188void 188void
189evas_event_callback_call(Evas *eo_e, Evas_Callback_Type type, void *event_info) 189evas_event_callback_call(Evas *eo_e, Evas_Callback_Type type, void *event_info)
190{ 190{
191 eo_event_callback_call(eo_e, _legacy_evas_callback_table(type), event_info); 191 efl_event_callback_call(eo_e, _legacy_evas_callback_table(type), event_info);
192} 192}
193 193
194void 194void
195evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, 195evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj,
196 Evas_Callback_Type type, void *event_info, int event_id, 196 Evas_Callback_Type type, void *event_info, int event_id,
197 const Eo_Event_Description *eo_event_desc, Efl_Event *eo_event_info) 197 const Efl_Event_Description *efl_event_desc, Efl_Event *efl_event_info)
198{ 198{
199 /* MEM OK */ 199 /* MEM OK */
200 Evas_Button_Flags flags = EVAS_BUTTON_NONE; 200 Evas_Button_Flags flags = EVAS_BUTTON_NONE;
@@ -235,9 +235,9 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
235 ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); 235 ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK);
236 } 236 }
237 obj->last_mouse_down_counter = e->last_mouse_down_counter; 237 obj->last_mouse_down_counter = e->last_mouse_down_counter;
238 if (eo_event_info) 238 if (efl_event_info)
239 { 239 {
240 efl_event_pointer_button_flags_set(eo_event_info, ev->flags); 240 efl_event_pointer_button_flags_set(efl_event_info, ev->flags);
241 } 241 }
242 break; 242 break;
243 } 243 }
@@ -252,9 +252,9 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
252 ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); 252 ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK);
253 } 253 }
254 obj->last_mouse_up_counter = e->last_mouse_up_counter; 254 obj->last_mouse_up_counter = e->last_mouse_up_counter;
255 if (eo_event_info) 255 if (efl_event_info)
256 { 256 {
257 efl_event_pointer_button_flags_set(eo_event_info, ev->flags); 257 efl_event_pointer_button_flags_set(efl_event_info, ev->flags);
258 } 258 }
259 break; 259 break;
260 } 260 }
@@ -263,10 +263,10 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
263 } 263 }
264 264
265 /* legacy callbacks - relying on Efl.Canvas.Object events */ 265 /* legacy callbacks - relying on Efl.Canvas.Object events */
266 eo_event_callback_call(eo_obj, _legacy_evas_callback_table(type), event_info); 266 efl_event_callback_call(eo_obj, _legacy_evas_callback_table(type), event_info);
267 267
268 /* new input events */ 268 /* new input events */
269 if (eo_event_desc) 269 if (efl_event_desc)
270 { 270 {
271 Efl_Event_Flags *pevflags = NULL; 271 Efl_Event_Flags *pevflags = NULL;
272 272
@@ -291,23 +291,23 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
291 } 291 }
292#undef EV_CASE 292#undef EV_CASE
293 293
294 if (pevflags) efl_event_flags_set(eo_event_info, *pevflags); 294 if (pevflags) efl_event_flags_set(efl_event_info, *pevflags);
295 eo_event_callback_call(eo_obj, eo_event_desc, eo_event_info); 295 efl_event_callback_call(eo_obj, efl_event_desc, efl_event_info);
296 } 296 }
297 297
298 if (type == EVAS_CALLBACK_MOUSE_DOWN) 298 if (type == EVAS_CALLBACK_MOUSE_DOWN)
299 { 299 {
300 Evas_Event_Mouse_Down *ev = event_info; 300 Evas_Event_Mouse_Down *ev = event_info;
301 ev->flags = flags; 301 ev->flags = flags;
302 if (eo_event_info) 302 if (efl_event_info)
303 efl_event_pointer_button_flags_set(eo_event_info, ev->flags); 303 efl_event_pointer_button_flags_set(efl_event_info, ev->flags);
304 } 304 }
305 else if (type == EVAS_CALLBACK_MOUSE_UP) 305 else if (type == EVAS_CALLBACK_MOUSE_UP)
306 { 306 {
307 Evas_Event_Mouse_Up *ev = event_info; 307 Evas_Event_Mouse_Up *ev = event_info;
308 ev->flags = flags; 308 ev->flags = flags;
309 if (eo_event_info) 309 if (efl_event_info)
310 efl_event_pointer_button_flags_set(eo_event_info, ev->flags); 310 efl_event_pointer_button_flags_set(efl_event_info, ev->flags);
311 } 311 }
312 312
313 nothing_here: 313 nothing_here:
@@ -317,7 +317,7 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
317 (type <= EVAS_CALLBACK_KEY_UP)) 317 (type <= EVAS_CALLBACK_KEY_UP))
318 { 318 {
319 Evas_Object_Protected_Data *smart_parent = eo_data_scope_get(obj->smart.parent, EFL_CANVAS_OBJECT_CLASS); 319 Evas_Object_Protected_Data *smart_parent = eo_data_scope_get(obj->smart.parent, EFL_CANVAS_OBJECT_CLASS);
320 evas_object_event_callback_call(obj->smart.parent, smart_parent, type, event_info, event_id, eo_event_desc, eo_event_info); 320 evas_object_event_callback_call(obj->smart.parent, smart_parent, type, event_info, event_id, efl_event_desc, efl_event_info);
321 } 321 }
322 } 322 }
323 _evas_unwalk(e); 323 _evas_unwalk(e);
@@ -347,8 +347,8 @@ evas_object_event_callback_priority_add(Evas_Object *eo_obj, Evas_Callback_Type
347 cb_info->data = (void *)data; 347 cb_info->data = (void *)data;
348 cb_info->type = type; 348 cb_info->type = type;
349 349
350 const Eo_Event_Description *desc = _legacy_evas_callback_table(type); 350 const Efl_Event_Description *desc = _legacy_evas_callback_table(type);
351 eo_event_callback_priority_add(eo_obj, desc, priority, _eo_evas_object_cb, cb_info); 351 efl_event_callback_priority_add(eo_obj, desc, priority, _eo_evas_object_cb, cb_info);
352 352
353 obj->callbacks = 353 obj->callbacks =
354 eina_inlist_append(obj->callbacks, EINA_INLIST_GET(cb_info)); 354 eina_inlist_append(obj->callbacks, EINA_INLIST_GET(cb_info));
@@ -374,7 +374,7 @@ evas_object_event_callback_del(Evas_Object *eo_obj, Evas_Callback_Type type, Eva
374 if ((info->func == func) && (info->type == type)) 374 if ((info->func == func) && (info->type == type))
375 { 375 {
376 void *tmp = info->data; 376 void *tmp = info->data;
377 eo_event_callback_del(eo_obj, _legacy_evas_callback_table(type), _eo_evas_object_cb, info); 377 efl_event_callback_del(eo_obj, _legacy_evas_callback_table(type), _eo_evas_object_cb, info);
378 378
379 obj->callbacks = 379 obj->callbacks =
380 eina_inlist_remove(obj->callbacks, EINA_INLIST_GET(info)); 380 eina_inlist_remove(obj->callbacks, EINA_INLIST_GET(info));
@@ -405,7 +405,7 @@ evas_object_event_callback_del_full(Evas_Object *eo_obj, Evas_Callback_Type type
405 if ((info->func == func) && (info->type == type) && info->data == data) 405 if ((info->func == func) && (info->type == type) && info->data == data)
406 { 406 {
407 void *tmp = info->data; 407 void *tmp = info->data;
408 eo_event_callback_del(eo_obj, _legacy_evas_callback_table(type), _eo_evas_object_cb, info); 408 efl_event_callback_del(eo_obj, _legacy_evas_callback_table(type), _eo_evas_object_cb, info);
409 409
410 obj->callbacks = 410 obj->callbacks =
411 eina_inlist_remove(obj->callbacks, EINA_INLIST_GET(info)); 411 eina_inlist_remove(obj->callbacks, EINA_INLIST_GET(info));
@@ -439,8 +439,8 @@ evas_event_callback_priority_add(Evas *eo_e, Evas_Callback_Type type, Evas_Callb
439 cb_info->data = (void *)data; 439 cb_info->data = (void *)data;
440 cb_info->type = type; 440 cb_info->type = type;
441 441
442 const Eo_Event_Description *desc = _legacy_evas_callback_table(type); 442 const Efl_Event_Description *desc = _legacy_evas_callback_table(type);
443 eo_event_callback_priority_add(eo_e, desc, priority, _eo_evas_cb, cb_info); 443 efl_event_callback_priority_add(eo_e, desc, priority, _eo_evas_cb, cb_info);
444 444
445 e->callbacks = eina_inlist_append(e->callbacks, EINA_INLIST_GET(cb_info)); 445 e->callbacks = eina_inlist_append(e->callbacks, EINA_INLIST_GET(cb_info));
446} 446}
@@ -465,7 +465,7 @@ evas_event_callback_del(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func)
465 if ((info->func == func) && (info->type == type)) 465 if ((info->func == func) && (info->type == type))
466 { 466 {
467 void *tmp = info->data; 467 void *tmp = info->data;
468 eo_event_callback_del(eo_e, _legacy_evas_callback_table(type), _eo_evas_cb, info); 468 efl_event_callback_del(eo_e, _legacy_evas_callback_table(type), _eo_evas_cb, info);
469 469
470 e->callbacks = 470 e->callbacks =
471 eina_inlist_remove(e->callbacks, EINA_INLIST_GET(info)); 471 eina_inlist_remove(e->callbacks, EINA_INLIST_GET(info));
@@ -496,7 +496,7 @@ evas_event_callback_del_full(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb
496 if ((info->func == func) && (info->type == type) && (info->data == data)) 496 if ((info->func == func) && (info->type == type) && (info->data == data))
497 { 497 {
498 void *tmp = info->data; 498 void *tmp = info->data;
499 eo_event_callback_del(eo_e, _legacy_evas_callback_table(type), _eo_evas_cb, info); 499 efl_event_callback_del(eo_e, _legacy_evas_callback_table(type), _eo_evas_cb, info);
500 500
501 e->callbacks = 501 e->callbacks =
502 eina_inlist_remove(e->callbacks, EINA_INLIST_GET(info)); 502 eina_inlist_remove(e->callbacks, EINA_INLIST_GET(info));