summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/canvas/evas_events.c
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/evas/src/lib/canvas/evas_events.c')
-rw-r--r--legacy/evas/src/lib/canvas/evas_events.c53
1 files changed, 27 insertions, 26 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_events.c b/legacy/evas/src/lib/canvas/evas_events.c
index 5a12b89..8f57068 100644
--- a/legacy/evas/src/lib/canvas/evas_events.c
+++ b/legacy/evas/src/lib/canvas/evas_events.c
@@ -163,7 +163,7 @@ _evas_event_source_events_call(Evas_Object_Protected_Data *src, Evas_Callback_Ty
163 Eina_List *l; 163 Eina_List *l;
164 Evas_Object *child_eo; 164 Evas_Object *child_eo;
165 Evas_Object_Protected_Data *child; 165 Evas_Object_Protected_Data *child;
166 EINA_LIST_FOREACH(src->proxy.event_in, l, child_eo) 166 EINA_LIST_FOREACH(src->proxy.src_event_in, l, child_eo)
167 { 167 {
168 if (src->delete_me) return; 168 if (src->delete_me) return;
169 child = eo_data_get(child_eo, EVAS_OBJ_CLASS); 169 child = eo_data_get(child_eo, EVAS_OBJ_CLASS);
@@ -211,17 +211,17 @@ _evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event
211 ev->output.x = ev->canvas.x; 211 ev->output.x = ev->canvas.x;
212 ev->output.y = ev->canvas.y; 212 ev->output.y = ev->canvas.y;
213 213
214 if (src->proxy.event_in) 214 if (src->proxy.src_event_in)
215 src->proxy.event_in = eina_list_free(src->proxy.event_in); 215 src->proxy.src_event_in = eina_list_free(src->proxy.src_event_in);
216 216
217 //FIXME: Needs to care the src mouse grab. 217 //FIXME: Needs to care the src mouse grab.
218 if (src->is_smart) 218 if (src->is_smart)
219 { 219 {
220 int no_rep = 0; 220 int no_rep = 0;
221 src->proxy.event_in = _evas_event_object_list_raw_in_get(eo_e, src->proxy.event_in, evas_object_smart_members_get_direct(eo_src), NULL, ev->canvas.x, ev->canvas.y, &no_rep, EINA_TRUE); 221 src->proxy.src_event_in = _evas_event_object_list_raw_in_get(eo_e, src->proxy.src_event_in, evas_object_smart_members_get_direct(eo_src), NULL, ev->canvas.x, ev->canvas.y, &no_rep, EINA_TRUE);
222 } 222 }
223 else 223 else
224 src->proxy.event_in = eina_list_append(src->proxy.event_in, src); 224 src->proxy.src_event_in = eina_list_append(src->proxy.src_event_in, src);
225 _evas_event_source_events_call(src, EVAS_CALLBACK_MOUSE_DOWN, ev, event_id); 225 _evas_event_source_events_call(src, EVAS_CALLBACK_MOUSE_DOWN, ev, event_id);
226 ev->canvas = canvas; 226 ev->canvas = canvas;
227 ev->output = output; 227 ev->output = output;
@@ -270,7 +270,7 @@ _evas_event_source_mouse_up_events(Evas_Object *eo_obj, Evas_Event_Mouse_Up *ev,
270 270
271 //FIXME: Needs to care the src mouse grab. 271 //FIXME: Needs to care the src mouse grab.
272 _evas_event_source_events_call(src, EVAS_CALLBACK_MOUSE_UP, ev, event_id); 272 _evas_event_source_events_call(src, EVAS_CALLBACK_MOUSE_UP, ev, event_id);
273 src->proxy.event_in = eina_list_free(src->proxy.event_in); 273 src->proxy.src_event_in = eina_list_free(src->proxy.src_event_in);
274 274
275 ev->canvas = canvas; 275 ev->canvas = canvas;
276 ev->output = output; 276 ev->output = output;
@@ -408,6 +408,7 @@ _evas_event_source_mouse_out_events(Evas_Object *eo_obj, Evas_Event_Mouse_Out *e
408 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); 408 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
409 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj); 409 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
410 Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS); 410 Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS);
411 Evas_Point output = ev->output;
411 Evas_Coord_Point canvas = ev->canvas; 412 Evas_Coord_Point canvas = ev->canvas;
412 413
413 if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return; 414 if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return;
@@ -684,7 +685,7 @@ _canvas_event_feed_mouse_down(Eo *eo_e, void *_pd, va_list *list)
684 evas_object_event_callback_call(eo_obj, obj, 685 evas_object_event_callback_call(eo_obj, obj,
685 EVAS_CALLBACK_MOUSE_DOWN, &ev, 686 EVAS_CALLBACK_MOUSE_DOWN, &ev,
686 event_id); 687 event_id);
687 if ((obj->proxy.is_proxy) && (obj->proxy.source_events)) 688 if ((obj->proxy.is_proxy) && (obj->proxy.src_events))
688 _evas_event_source_mouse_down_events(eo_obj, eo_e, &ev, 689 _evas_event_source_mouse_down_events(eo_obj, eo_e, &ev,
689 event_id); 690 event_id);
690 } 691 }
@@ -749,7 +750,7 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data)
749 evas_object_event_callback_call(eo_obj, obj, 750 evas_object_event_callback_call(eo_obj, obj,
750 EVAS_CALLBACK_MOUSE_OUT, 751 EVAS_CALLBACK_MOUSE_OUT,
751 &ev, event_id); 752 &ev, event_id);
752 if ((obj->proxy.is_proxy) && (obj->proxy.source_events)) 753 if ((obj->proxy.is_proxy) && (obj->proxy.src_events))
753 _evas_event_source_mouse_out_events(eo_obj, &ev, 754 _evas_event_source_mouse_out_events(eo_obj, &ev,
754 event_id); 755 event_id);
755 } 756 }
@@ -796,7 +797,7 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data)
796 evas_object_event_callback_call(eo_obj_itr, obj_itr, 797 evas_object_event_callback_call(eo_obj_itr, obj_itr,
797 EVAS_CALLBACK_MOUSE_IN, &ev_in, event_id); 798 EVAS_CALLBACK_MOUSE_IN, &ev_in, event_id);
798 if ((obj_itr->proxy.is_proxy) && 799 if ((obj_itr->proxy.is_proxy) &&
799 (obj_itr->proxy.source_events)) 800 (obj_itr->proxy.src_events))
800 _evas_event_source_mouse_in_events(eo_obj_itr, 801 _evas_event_source_mouse_in_events(eo_obj_itr,
801 &ev_in, 802 &ev_in,
802 event_id); 803 event_id);
@@ -908,7 +909,7 @@ _canvas_event_feed_mouse_up(Eo *eo_e, void *_pd, va_list *list)
908 evas_object_event_callback_call(eo_obj, obj, 909 evas_object_event_callback_call(eo_obj, obj,
909 EVAS_CALLBACK_MOUSE_UP, 910 EVAS_CALLBACK_MOUSE_UP,
910 &ev, event_id); 911 &ev, event_id);
911 if ((obj->proxy.is_proxy) && (obj->proxy.source_events)) 912 if ((obj->proxy.is_proxy) && (obj->proxy.src_events))
912 _evas_event_source_mouse_up_events(eo_obj, &ev, 913 _evas_event_source_mouse_up_events(eo_obj, &ev,
913 event_id); 914 event_id);
914 } 915 }
@@ -1032,7 +1033,7 @@ _canvas_event_feed_mouse_wheel(Eo *eo_e, void *_pd, va_list *list)
1032 evas_object_event_callback_call(eo_obj, obj, 1033 evas_object_event_callback_call(eo_obj, obj,
1033 EVAS_CALLBACK_MOUSE_WHEEL, &ev, 1034 EVAS_CALLBACK_MOUSE_WHEEL, &ev,
1034 event_id); 1035 event_id);
1035 if ((obj->proxy.is_proxy) && (obj->proxy.source_events)) 1036 if ((obj->proxy.is_proxy) && (obj->proxy.src_events))
1036 _evas_event_source_wheel_events(eo_obj, &ev, event_id); 1037 _evas_event_source_wheel_events(eo_obj, &ev, event_id);
1037 } 1038 }
1038 if (e->delete_me) break; 1039 if (e->delete_me) break;
@@ -1139,7 +1140,7 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list)
1139 { 1140 {
1140 evas_object_event_callback_call(eo_obj, obj, 1141 evas_object_event_callback_call(eo_obj, obj,
1141 EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); 1142 EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id);
1142 if ((obj->proxy.is_proxy) && (obj->proxy.source_events)) 1143 if ((obj->proxy.is_proxy) && (obj->proxy.src_events))
1143 _evas_event_source_mouse_move_events(eo_obj, &ev, 1144 _evas_event_source_mouse_move_events(eo_obj, &ev,
1144 event_id); 1145 event_id);
1145 } 1146 }
@@ -1204,7 +1205,7 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list)
1204 obj, 1205 obj,
1205 EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); 1206 EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
1206 if ((obj->proxy.is_proxy) && 1207 if ((obj->proxy.is_proxy) &&
1207 (obj->proxy.source_events)) 1208 (obj->proxy.src_events))
1208 _evas_event_source_mouse_out_events(eo_obj, &ev, event_id); 1209 _evas_event_source_mouse_out_events(eo_obj, &ev, event_id);
1209 } 1210 }
1210 } 1211 }
@@ -1298,7 +1299,7 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list)
1298 ev.cur.canvas.y = e->pointer.y; 1299 ev.cur.canvas.y = e->pointer.y;
1299 _evas_event_havemap_adjust(eo_obj, obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); 1300 _evas_event_havemap_adjust(eo_obj, obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
1300 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); 1301 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id);
1301 if ((obj->proxy.is_proxy) && (obj->proxy.source_events)) 1302 if ((obj->proxy.is_proxy) && (obj->proxy.src_events))
1302 _evas_event_source_mouse_move_events(eo_obj,&ev, 1303 _evas_event_source_mouse_move_events(eo_obj,&ev,
1303 event_id); 1304 event_id);
1304 } 1305 }
@@ -1318,7 +1319,7 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list)
1318 evas_object_event_callback_call(eo_obj, obj, 1319 evas_object_event_callback_call(eo_obj, obj,
1319 EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); 1320 EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id);
1320 if ((obj->proxy.is_proxy) && 1321 if ((obj->proxy.is_proxy) &&
1321 (obj->proxy.source_events)) 1322 (obj->proxy.src_events))
1322 _evas_event_source_mouse_out_events(eo_obj, &ev2, 1323 _evas_event_source_mouse_out_events(eo_obj, &ev2,
1323 event_id); 1324 event_id);
1324 } 1325 }
@@ -1351,7 +1352,7 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list)
1351 evas_object_event_callback_call(eo_obj, obj, 1352 evas_object_event_callback_call(eo_obj, obj,
1352 EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); 1353 EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2);
1353 if ((obj->proxy.is_proxy) && 1354 if ((obj->proxy.is_proxy) &&
1354 (obj->proxy.source_events)) 1355 (obj->proxy.src_events))
1355 _evas_event_source_mouse_in_events(eo_obj, &ev3, 1356 _evas_event_source_mouse_in_events(eo_obj, &ev3,
1356 event_id2); 1357 event_id2);
1357 } 1358 }
@@ -1490,7 +1491,7 @@ nogrep:
1490 _evas_event_framespace_adjust(eo_obj, &ev.cur.canvas.x, &ev.cur.canvas.y); 1491 _evas_event_framespace_adjust(eo_obj, &ev.cur.canvas.x, &ev.cur.canvas.y);
1491 _evas_event_havemap_adjust(eo_obj, obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); 1492 _evas_event_havemap_adjust(eo_obj, obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
1492 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); 1493 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id);
1493 if ((obj->proxy.is_proxy) && (obj->proxy.source_events)) 1494 if ((obj->proxy.is_proxy) && (obj->proxy.src_events))
1494 _evas_event_source_mouse_move_events(eo_obj, &ev, 1495 _evas_event_source_mouse_move_events(eo_obj, &ev,
1495 event_id); 1496 event_id);
1496 } 1497 }
@@ -1510,7 +1511,7 @@ nogrep:
1510 evas_object_event_callback_call(eo_obj, obj, 1511 evas_object_event_callback_call(eo_obj, obj,
1511 EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); 1512 EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id);
1512 if ((obj->proxy.is_proxy) && 1513 if ((obj->proxy.is_proxy) &&
1513 (obj->proxy.source_events)) 1514 (obj->proxy.src_events))
1514 _evas_event_source_mouse_out_events(eo_obj, &ev2, 1515 _evas_event_source_mouse_out_events(eo_obj, &ev2,
1515 event_id); 1516 event_id);
1516 } 1517 }
@@ -1543,7 +1544,7 @@ nogrep:
1543 evas_object_event_callback_call(eo_obj, obj, 1544 evas_object_event_callback_call(eo_obj, obj,
1544 EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); 1545 EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2);
1545 if ((obj->proxy.is_proxy) && 1546 if ((obj->proxy.is_proxy) &&
1546 (obj->proxy.source_events)) 1547 (obj->proxy.src_events))
1547 _evas_event_source_mouse_in_events(eo_obj, &ev3, 1548 _evas_event_source_mouse_in_events(eo_obj, &ev3,
1548 event_id2); 1549 event_id2);
1549 } 1550 }
@@ -1628,7 +1629,7 @@ _canvas_event_feed_mouse_in(Eo *eo_e, void *_pd, va_list *list)
1628 evas_object_event_callback_call(eo_obj, obj, 1629 evas_object_event_callback_call(eo_obj, obj,
1629 EVAS_CALLBACK_MOUSE_IN, 1630 EVAS_CALLBACK_MOUSE_IN,
1630 &ev, event_id); 1631 &ev, event_id);
1631 if ((obj->proxy.is_proxy) && (obj->proxy.source_events)) 1632 if ((obj->proxy.is_proxy) && (obj->proxy.src_events))
1632 _evas_event_source_mouse_in_events(eo_obj, &ev, 1633 _evas_event_source_mouse_in_events(eo_obj, &ev,
1633 event_id); 1634 event_id);
1634 } 1635 }
@@ -1712,7 +1713,7 @@ _canvas_event_feed_mouse_out(Eo *eo_e, void *_pd, va_list *list)
1712 evas_object_event_callback_call(eo_obj, obj, 1713 evas_object_event_callback_call(eo_obj, obj,
1713 EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); 1714 EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
1714 if ((obj->proxy.is_proxy) && 1715 if ((obj->proxy.is_proxy) &&
1715 (obj->proxy.source_events)) 1716 (obj->proxy.src_events))
1716 _evas_event_source_mouse_out_events(eo_obj, &ev, 1717 _evas_event_source_mouse_out_events(eo_obj, &ev,
1717 event_id); 1718 event_id);
1718 } 1719 }
@@ -1834,7 +1835,7 @@ _canvas_event_feed_multi_down(Eo *eo_e, void *_pd, va_list *list)
1834 evas_object_event_callback_call(eo_obj, obj, 1835 evas_object_event_callback_call(eo_obj, obj,
1835 EVAS_CALLBACK_MULTI_DOWN, &ev, 1836 EVAS_CALLBACK_MULTI_DOWN, &ev,
1836 event_id); 1837 event_id);
1837 if ((obj->proxy.is_proxy) || (obj->proxy.source_events)) 1838 if ((obj->proxy.is_proxy) || (obj->proxy.src_events))
1838 _evas_event_source_multi_down_events(eo_obj, &ev, event_id); 1839 _evas_event_source_multi_down_events(eo_obj, &ev, event_id);
1839 } 1840 }
1840 if (e->delete_me) break; 1841 if (e->delete_me) break;
@@ -1943,7 +1944,7 @@ _canvas_event_feed_multi_up(Eo *eo_e, void *_pd, va_list *list)
1943 evas_object_event_callback_call(eo_obj, obj, 1944 evas_object_event_callback_call(eo_obj, obj,
1944 EVAS_CALLBACK_MULTI_UP, &ev, 1945 EVAS_CALLBACK_MULTI_UP, &ev,
1945 event_id); 1946 event_id);
1946 if ((obj->proxy.is_proxy) || (obj->proxy.source_events)) 1947 if ((obj->proxy.is_proxy) || (obj->proxy.src_events))
1947 _evas_event_source_multi_up_events(eo_obj, &ev, event_id); 1948 _evas_event_source_multi_up_events(eo_obj, &ev, event_id);
1948 } 1949 }
1949 if (e->delete_me) break; 1950 if (e->delete_me) break;
@@ -2053,7 +2054,7 @@ _canvas_event_feed_multi_move(Eo *eo_e, void *_pd, va_list *list)
2053 if (y != ev.cur.canvas.y) 2054 if (y != ev.cur.canvas.y)
2054 ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision 2055 ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision
2055 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); 2056 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id);
2056 if ((obj->proxy.is_proxy) || (obj->proxy.source_events)) 2057 if ((obj->proxy.is_proxy) || (obj->proxy.src_events))
2057 _evas_event_source_multi_move_events(eo_obj, &ev, event_id); 2058 _evas_event_source_multi_move_events(eo_obj, &ev, event_id);
2058 } 2059 }
2059 if (e->delete_me) break; 2060 if (e->delete_me) break;
@@ -2126,7 +2127,7 @@ _canvas_event_feed_multi_move(Eo *eo_e, void *_pd, va_list *list)
2126 if (y != ev.cur.canvas.y) 2127 if (y != ev.cur.canvas.y)
2127 ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision 2128 ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision
2128 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); 2129 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id);
2129 if ((obj->proxy.is_proxy) || (obj->proxy.source_events)) 2130 if ((obj->proxy.is_proxy) || (obj->proxy.src_events))
2130 _evas_event_source_multi_move_events(eo_obj, &ev, event_id); 2131 _evas_event_source_multi_move_events(eo_obj, &ev, event_id);
2131 } 2132 }
2132 if (e->delete_me) break; 2133 if (e->delete_me) break;
@@ -2415,7 +2416,7 @@ _canvas_event_feed_hold(Eo *eo_e, void *_pd, va_list *list)
2415 { 2416 {
2416 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HOLD, 2417 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HOLD,
2417 &ev, event_id); 2418 &ev, event_id);
2418 if ((obj->proxy.is_proxy) && (obj->proxy.source_events)) 2419 if ((obj->proxy.is_proxy) && (obj->proxy.src_events))
2419 _evas_event_source_hold_events(eo_obj, &ev, event_id); 2420 _evas_event_source_hold_events(eo_obj, &ev, event_id);
2420 } 2421 }
2421 if (e->delete_me) break; 2422 if (e->delete_me) break;