summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-08-26 11:27:37 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-08-26 11:28:34 +0900
commit9123e5add273b5488981d1cc8b1a031815ffccb4 (patch)
treeaec0c2d41ff0a36b5cf530ec740265569ce02271
parentd504284dd241d2d1713e9e94f7e6efee8e0ee9ac (diff)
evas events: Add efl_isa safety checks in legacy EAPI
This removes useless magic checks (only check whether the arg is not null) that were not even present in every function. The cost should be similar or lower than an eo function call.
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c57
-rw-r--r--src/lib/evas/canvas/evas_events.c33
2 files changed, 31 insertions, 59 deletions
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index 0e2835b1d0..e1ccac721f 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -370,12 +370,9 @@ evas_object_event_callback_add(Evas_Object *eo_obj, Evas_Callback_Type type, Eva
370EAPI void 370EAPI void
371evas_object_event_callback_priority_add(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data) 371evas_object_event_callback_priority_add(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data)
372{ 372{
373 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_obj, EFL_CANVAS_OBJECT_CLASS));
373 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 374 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
374 375
375 MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
376 return;
377 MAGIC_CHECK_END();
378
379 if (!obj) return; 376 if (!obj) return;
380 if (!func) return; 377 if (!func) return;
381 378
@@ -395,12 +392,9 @@ evas_object_event_callback_priority_add(Evas_Object *eo_obj, Evas_Callback_Type
395EAPI void * 392EAPI void *
396evas_object_event_callback_del(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) 393evas_object_event_callback_del(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func)
397{ 394{
398 _eo_evas_object_cb_info *info; 395 EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(eo_obj, EFL_CANVAS_OBJECT_CLASS), NULL);
399
400 MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
401 return NULL;
402 MAGIC_CHECK_END();
403 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 396 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
397 _eo_evas_object_cb_info *info;
404 398
405 if (!obj) return NULL; 399 if (!obj) return NULL;
406 if (!func) return NULL; 400 if (!func) return NULL;
@@ -426,12 +420,9 @@ evas_object_event_callback_del(Evas_Object *eo_obj, Evas_Callback_Type type, Eva
426EAPI void * 420EAPI void *
427evas_object_event_callback_del_full(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) 421evas_object_event_callback_del_full(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
428{ 422{
429 _eo_evas_object_cb_info *info; 423 EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(eo_obj, EFL_CANVAS_OBJECT_CLASS), NULL);
430
431 MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
432 return NULL;
433 MAGIC_CHECK_END();
434 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 424 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
425 _eo_evas_object_cb_info *info;
435 426
436 if (!obj) return NULL; 427 if (!obj) return NULL;
437 if (!func) return NULL; 428 if (!func) return NULL;
@@ -464,12 +455,9 @@ evas_event_callback_add(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func,
464EAPI void 455EAPI void
465evas_event_callback_priority_add(Evas *eo_e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data) 456evas_event_callback_priority_add(Evas *eo_e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data)
466{ 457{
458 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
467 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 459 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
468 460
469 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
470 return;
471 MAGIC_CHECK_END();
472
473 if (!func) return; 461 if (!func) return;
474 462
475 _eo_evas_cb_info *cb_info = calloc(1, sizeof(*cb_info)); 463 _eo_evas_cb_info *cb_info = calloc(1, sizeof(*cb_info));
@@ -486,13 +474,10 @@ evas_event_callback_priority_add(Evas *eo_e, Evas_Callback_Type type, Evas_Callb
486EAPI void * 474EAPI void *
487evas_event_callback_del(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func) 475evas_event_callback_del(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func)
488{ 476{
477 EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(eo_e, EVAS_CANVAS_CLASS), NULL);
489 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 478 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
490 _eo_evas_cb_info *info; 479 _eo_evas_cb_info *info;
491 480
492 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
493 return NULL;
494 MAGIC_CHECK_END();
495
496 if (!e) return NULL; 481 if (!e) return NULL;
497 if (!func) return NULL; 482 if (!func) return NULL;
498 483
@@ -517,12 +502,9 @@ evas_event_callback_del(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func)
517EAPI void * 502EAPI void *
518evas_event_callback_del_full(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) 503evas_event_callback_del_full(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
519{ 504{
520 _eo_evas_cb_info *info; 505 EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(eo_e, EVAS_CANVAS_CLASS), NULL);
521
522 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
523 return NULL;
524 MAGIC_CHECK_END();
525 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 506 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
507 _eo_evas_cb_info *info;
526 508
527 if (!e) return NULL; 509 if (!e) return NULL;
528 if (!func) return NULL; 510 if (!func) return NULL;
@@ -548,13 +530,10 @@ evas_event_callback_del_full(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb
548EAPI void 530EAPI void
549evas_post_event_callback_push(Evas *eo_e, Evas_Object_Event_Post_Cb func, const void *data) 531evas_post_event_callback_push(Evas *eo_e, Evas_Object_Event_Post_Cb func, const void *data)
550{ 532{
533 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
534 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
551 Evas_Post_Callback *pc; 535 Evas_Post_Callback *pc;
552 536
553 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
554 return;
555 MAGIC_CHECK_END();
556
557 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
558 if (!e) return; 537 if (!e) return;
559 EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, ); 538 EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, );
560 pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback); 539 pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback);
@@ -570,14 +549,11 @@ evas_post_event_callback_push(Evas *eo_e, Evas_Object_Event_Post_Cb func, const
570EAPI void 549EAPI void
571evas_post_event_callback_remove(Evas *eo_e, Evas_Object_Event_Post_Cb func) 550evas_post_event_callback_remove(Evas *eo_e, Evas_Object_Event_Post_Cb func)
572{ 551{
552 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
553 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
573 Evas_Post_Callback *pc; 554 Evas_Post_Callback *pc;
574 Eina_List *l; 555 Eina_List *l;
575 556
576 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
577 return;
578 MAGIC_CHECK_END();
579
580 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
581 if (!e) return; 557 if (!e) return;
582 EINA_LIST_FOREACH(e->post_events, l, pc) 558 EINA_LIST_FOREACH(e->post_events, l, pc)
583 { 559 {
@@ -592,14 +568,11 @@ evas_post_event_callback_remove(Evas *eo_e, Evas_Object_Event_Post_Cb func)
592EAPI void 568EAPI void
593evas_post_event_callback_remove_full(Evas *eo_e, Evas_Object_Event_Post_Cb func, const void *data) 569evas_post_event_callback_remove_full(Evas *eo_e, Evas_Object_Event_Post_Cb func, const void *data)
594{ 570{
571 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
572 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
595 Evas_Post_Callback *pc; 573 Evas_Post_Callback *pc;
596 Eina_List *l; 574 Eina_List *l;
597 575
598 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
599 return;
600 MAGIC_CHECK_END();
601
602 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
603 if (!e) return; 576 if (!e) return;
604 EINA_LIST_FOREACH(e->post_events, l, pc) 577 EINA_LIST_FOREACH(e->post_events, l, pc)
605 { 578 {
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c
index bc09992a9d..6a17cb427a 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -1140,18 +1140,12 @@ _canvas_event_thaw_eval_internal(Eo *eo_e, Evas_Public_Data *e)
1140EAPI void 1140EAPI void
1141evas_event_freeze(Evas *eo_e) 1141evas_event_freeze(Evas *eo_e)
1142{ 1142{
1143 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
1144 return;
1145 MAGIC_CHECK_END();
1146 efl_event_freeze(eo_e); 1143 efl_event_freeze(eo_e);
1147} 1144}
1148 1145
1149EAPI void 1146EAPI void
1150evas_event_thaw(Evas *eo_e) 1147evas_event_thaw(Evas *eo_e)
1151{ 1148{
1152 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
1153 return;
1154 MAGIC_CHECK_END();
1155 efl_event_thaw(eo_e); 1149 efl_event_thaw(eo_e);
1156} 1150}
1157 1151
@@ -1191,23 +1185,16 @@ _evas_canvas_efl_object_event_thaw(Eo *eo_e, Evas_Public_Data *e)
1191EAPI int 1185EAPI int
1192evas_event_freeze_get(const Evas *eo_e) 1186evas_event_freeze_get(const Evas *eo_e)
1193{ 1187{
1194 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); 1188 return efl_event_freeze_count_get(eo_e);
1195 return 0;
1196 MAGIC_CHECK_END();
1197 int ret = 0;
1198 ret = efl_event_freeze_count_get((Eo *)eo_e);
1199 return ret;
1200} 1189}
1201 1190
1202EAPI void 1191EAPI void
1203evas_event_thaw_eval(Evas *eo_e) 1192evas_event_thaw_eval(Evas *eo_e)
1204{ 1193{
1205 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); 1194 if (!evas_event_freeze_get(eo_e))
1206 return;
1207 MAGIC_CHECK_END();
1208 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
1209 if (0 == evas_event_freeze_get(eo_e))
1210 { 1195 {
1196 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
1197 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
1211 _canvas_event_thaw_eval_internal(eo_e, e); 1198 _canvas_event_thaw_eval_internal(eo_e, e);
1212 } 1199 }
1213} 1200}
@@ -1676,6 +1663,7 @@ _canvas_event_feed_mouse_wheel_internal(Eo *eo_e, Efl_Input_Pointer_Data *pe)
1676EAPI void 1663EAPI void
1677evas_event_feed_mouse_wheel(Eo *eo_e, int direction, int z, unsigned int timestamp, const void *data) 1664evas_event_feed_mouse_wheel(Eo *eo_e, int direction, int z, unsigned int timestamp, const void *data)
1678{ 1665{
1666 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
1679 Efl_Input_Pointer_Data *ev = NULL; 1667 Efl_Input_Pointer_Data *ev = NULL;
1680 Efl_Input_Pointer *evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, eo_e, (void **) &ev); 1668 Efl_Input_Pointer *evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, eo_e, (void **) &ev);
1681 1669
@@ -2221,12 +2209,14 @@ _canvas_event_feed_mouse_inout_legacy(Eo *eo_e, unsigned int timestamp,
2221EAPI void 2209EAPI void
2222evas_event_feed_mouse_in(Eo *eo_e, unsigned int timestamp, const void *data) 2210evas_event_feed_mouse_in(Eo *eo_e, unsigned int timestamp, const void *data)
2223{ 2211{
2212 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
2224 _canvas_event_feed_mouse_inout_legacy(eo_e, timestamp, data, EINA_TRUE); 2213 _canvas_event_feed_mouse_inout_legacy(eo_e, timestamp, data, EINA_TRUE);
2225} 2214}
2226 2215
2227EAPI void 2216EAPI void
2228evas_event_feed_mouse_out(Eo *eo_e, unsigned int timestamp, const void *data) 2217evas_event_feed_mouse_out(Eo *eo_e, unsigned int timestamp, const void *data)
2229{ 2218{
2219 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
2230 _canvas_event_feed_mouse_inout_legacy(eo_e, timestamp, data, EINA_FALSE); 2220 _canvas_event_feed_mouse_inout_legacy(eo_e, timestamp, data, EINA_FALSE);
2231} 2221}
2232 2222
@@ -2416,6 +2406,7 @@ _canvas_event_feed_multi_internal(Evas *eo_e, Evas_Public_Data *e,
2416EAPI void 2406EAPI void
2417evas_event_input_multi_down(Eo *eo_e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data) 2407evas_event_input_multi_down(Eo *eo_e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
2418{ 2408{
2409 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
2419 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 2410 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
2420 _canvas_event_feed_multi_internal(eo_e, e, d, 2411 _canvas_event_feed_multi_internal(eo_e, e, d,
2421 x - e->framespace.x, y - e->framespace.y, 2412 x - e->framespace.x, y - e->framespace.y,
@@ -2426,6 +2417,7 @@ evas_event_input_multi_down(Eo *eo_e, int d, int x, int y, double rad, double ra
2426EAPI void 2417EAPI void
2427evas_event_feed_multi_down(Eo *eo_e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data) 2418evas_event_feed_multi_down(Eo *eo_e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
2428{ 2419{
2420 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
2429 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 2421 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
2430 _canvas_event_feed_multi_internal(eo_e, e, d, x, y, rad, radx, rady, pres, ang, 2422 _canvas_event_feed_multi_internal(eo_e, e, d, x, y, rad, radx, rady, pres, ang,
2431 fx, fy, flags, timestamp, data, EFL_POINTER_ACTION_DOWN); 2423 fx, fy, flags, timestamp, data, EFL_POINTER_ACTION_DOWN);
@@ -2434,6 +2426,7 @@ evas_event_feed_multi_down(Eo *eo_e, int d, int x, int y, double rad, double rad
2434EAPI void 2426EAPI void
2435evas_event_input_multi_up(Eo *eo_e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data) 2427evas_event_input_multi_up(Eo *eo_e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
2436{ 2428{
2429 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
2437 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 2430 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
2438 _canvas_event_feed_multi_internal(eo_e, e, d, 2431 _canvas_event_feed_multi_internal(eo_e, e, d,
2439 x - e->framespace.x, y - e->framespace.y, 2432 x - e->framespace.x, y - e->framespace.y,
@@ -2444,6 +2437,7 @@ evas_event_input_multi_up(Eo *eo_e, int d, int x, int y, double rad, double radx
2444EAPI void 2437EAPI void
2445evas_event_feed_multi_up(Eo *eo_e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data) 2438evas_event_feed_multi_up(Eo *eo_e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
2446{ 2439{
2440 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
2447 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 2441 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
2448 _canvas_event_feed_multi_internal(eo_e, e, d, x, y, rad, radx, rady, pres, ang, 2442 _canvas_event_feed_multi_internal(eo_e, e, d, x, y, rad, radx, rady, pres, ang,
2449 fx, fy, flags, timestamp, data, EFL_POINTER_ACTION_UP); 2443 fx, fy, flags, timestamp, data, EFL_POINTER_ACTION_UP);
@@ -2805,6 +2799,7 @@ _canvas_event_feed_key_legacy(Eo *eo_e, Evas_Public_Data *e,
2805EAPI void 2799EAPI void
2806evas_event_feed_key_down(Eo *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) 2800evas_event_feed_key_down(Eo *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data)
2807{ 2801{
2802 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
2808 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 2803 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
2809 _canvas_event_feed_key_legacy(eo_e, e, keyname, key, string, 2804 _canvas_event_feed_key_legacy(eo_e, e, keyname, key, string,
2810 compose, timestamp, data, 0, 1); 2805 compose, timestamp, data, 0, 1);
@@ -2813,6 +2808,7 @@ evas_event_feed_key_down(Eo *eo_e, const char *keyname, const char *key, const c
2813EAPI void 2808EAPI void
2814evas_event_feed_key_up(Eo *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) 2809evas_event_feed_key_up(Eo *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data)
2815{ 2810{
2811 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
2816 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 2812 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
2817 _canvas_event_feed_key_legacy(eo_e, e, keyname, key, string, 2813 _canvas_event_feed_key_legacy(eo_e, e, keyname, key, string,
2818 compose, timestamp, data, 0, 0); 2814 compose, timestamp, data, 0, 0);
@@ -2821,6 +2817,7 @@ evas_event_feed_key_up(Eo *eo_e, const char *keyname, const char *key, const cha
2821EAPI void 2817EAPI void
2822evas_event_feed_key_down_with_keycode(Eo *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data, unsigned int keycode) 2818evas_event_feed_key_down_with_keycode(Eo *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data, unsigned int keycode)
2823{ 2819{
2820 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
2824 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 2821 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
2825 _canvas_event_feed_key_legacy(eo_e, e, keyname, key, string, 2822 _canvas_event_feed_key_legacy(eo_e, e, keyname, key, string,
2826 compose, timestamp, data, keycode, 1); 2823 compose, timestamp, data, keycode, 1);
@@ -2829,6 +2826,7 @@ evas_event_feed_key_down_with_keycode(Eo *eo_e, const char *keyname, const char
2829EAPI void 2826EAPI void
2830evas_event_feed_key_up_with_keycode(Eo *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data, unsigned int keycode) 2827evas_event_feed_key_up_with_keycode(Eo *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data, unsigned int keycode)
2831{ 2828{
2829 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
2832 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 2830 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
2833 _canvas_event_feed_key_legacy(eo_e, e, keyname, key, string, 2831 _canvas_event_feed_key_legacy(eo_e, e, keyname, key, string,
2834 compose, timestamp, data, keycode, 0); 2832 compose, timestamp, data, keycode, 0);
@@ -3176,6 +3174,7 @@ _efl_canvas_object_pointer_mode_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protecte
3176EAPI void 3174EAPI void
3177evas_event_refeed_event(Eo *eo_e, void *event_copy, Evas_Callback_Type event_type) 3175evas_event_refeed_event(Eo *eo_e, void *event_copy, Evas_Callback_Type event_type)
3178{ 3176{
3177 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
3179 if (!event_copy) return; 3178 if (!event_copy) return;
3180 3179
3181 switch (event_type) 3180 switch (event_type)