summaryrefslogtreecommitdiff
path: root/legacy/evas/src
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2012-10-25 15:12:54 +0000
committerChunEon Park <hermet@hermet.pe.kr>2012-10-25 15:12:54 +0000
commitecc24faf1e69f7cde876864fe80ae524d855ef57 (patch)
treea88d84c8e93d5396b8e17ecb748f592db6c676cb /legacy/evas/src
parent26fe925760d5d398319397f903952c1b421faeae (diff)
evas/events - separate source_events feed functions. need to care more.
SVN revision: 78458
Diffstat (limited to 'legacy/evas/src')
-rw-r--r--legacy/evas/src/lib/canvas/evas_events.c449
-rw-r--r--legacy/evas/src/lib/include/evas_private.h1
2 files changed, 310 insertions, 140 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_events.c b/legacy/evas/src/lib/canvas/evas_events.c
index c45cf44a23..5a12b891e6 100644
--- a/legacy/evas/src/lib/canvas/evas_events.c
+++ b/legacy/evas/src/lib/canvas/evas_events.c
@@ -158,59 +158,269 @@ _evas_event_object_list_raw_in_get(Evas *eo_e, Eina_List *in,
158} 158}
159 159
160static void 160static void
161_evas_object_source_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Coord x, Evas_Coord y, Evas_Callback_Type type, void *ev, int event_id) 161_evas_event_source_events_call(Evas_Object_Protected_Data *src, Evas_Callback_Type type, void *ev, int event_id)
162{
163 Eina_List *l;
164 Evas_Object *child_eo;
165 Evas_Object_Protected_Data *child;
166 EINA_LIST_FOREACH(src->proxy.event_in, l, child_eo)
167 {
168 if (src->delete_me) return;
169 child = eo_data_get(child_eo, EVAS_OBJ_CLASS);
170 evas_object_event_callback_call(child_eo, child, type, ev, event_id);
171 if (src->layer->evas->delete_me) break;
172 }
173}
174
175static void
176_transform_to_src_space(Evas_Object_Protected_Data *obj, Evas_Object_Protected_Data *src, Evas_Coord *x, Evas_Coord *y)
177{
178 Evas_Coord obj_w = obj->cur.geometry.w, obj_h = obj->cur.geometry.h;
179 Evas_Coord src_w = src->cur.geometry.w, src_h = src->cur.geometry.h;
180 Evas_Coord tmp_x = *x;
181 Evas_Coord tmp_y = *y;
182
183 tmp_x -= obj->cur.geometry.x;
184 tmp_y -= obj->cur.geometry.y;
185
186 if (obj_w != src_w)
187 tmp_x = (Evas_Coord) ((float)tmp_x * ((float)src_w / (float)obj_w));
188 if (obj_h != src_h)
189 tmp_y = (Evas_Coord) ((float)tmp_y * ((float)src_h / (float)obj_h));
190
191 tmp_x += src->cur.geometry.x;
192 tmp_y += src->cur.geometry.y;
193 *x = tmp_x;
194 *y = tmp_y;
195}
196
197static void
198_evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_Mouse_Down *ev, int event_id)
162{ 199{
163 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); 200 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
164 Evas_Object *src_eo = _evas_object_image_source_get(eo_obj); 201 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
165 Evas_Object_Protected_Data *src = eo_data_get(src_eo, 202 Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS);
166 EVAS_OBJ_CLASS);
167 Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); 203 Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
168 Evas_Coord w1 = obj->cur.geometry.w; 204 Evas_Point output = ev->output;
169 Evas_Coord h1 = obj->cur.geometry.h; 205 Evas_Coord_Point canvas = ev->canvas;
170 Evas_Coord w2 = src->cur.geometry.w; 206
171 Evas_Coord h2 = src->cur.geometry.h; 207 if (obj->delete_me || src->delete_me || e->is_frozen) return;
172 208
173 x -= obj->cur.geometry.x; 209 _transform_to_src_space(obj, src, &ev->canvas.x, &ev->canvas.y);
174 y -= obj->cur.geometry.y;
175 210
176 if (w1 != w2) x = (Evas_Coord) ((float)x * ((float)w2 / (float)w1)); 211 ev->output.x = ev->canvas.x;
177 if (h1 != h2) y = (Evas_Coord) ((float)y * ((float)w2 / (float)w1)); 212 ev->output.y = ev->canvas.y;
178 213
179 x += src->cur.geometry.x; 214 if (src->proxy.event_in)
180 y += src->cur.geometry.y; 215 src->proxy.event_in = eina_list_free(src->proxy.event_in);
181 216
182 //FIXME: handle for key events and hold 217 //FIXME: Needs to care the src mouse grab.
183 //FIXME: If the src doesn't have geometry info
184 if (src->is_smart) 218 if (src->is_smart)
185 { 219 {
186 Eina_List *in = NULL, *l = NULL;
187 Evas_Object *child_eo;
188 Evas_Object_Protected_Data *child;
189 int no_rep = 0; 220 int no_rep = 0;
190 //Optimize Here: Keep this list in proxy image for up and move 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);
191 in = _evas_event_object_list_raw_in_get(eo_e, in,
192 evas_object_smart_members_get_direct(src_eo), NULL, x, y, &no_rep, EINA_TRUE);
193 EINA_LIST_FOREACH(in, l, child_eo)
194 {
195 if (obj->delete_me || src->delete_me) return;
196 child = eo_data_get(child_eo, EVAS_OBJ_CLASS);
197 if (child->delete_me) continue;
198 evas_object_event_callback_call(child_eo, child,
199 type,
200 ev,
201 event_id);
202 }
203 eina_list_free(in);
204 } 222 }
205 else 223 else
206 evas_object_event_callback_call(src_eo, src, type, ev, event_id); 224 src->proxy.event_in = eina_list_append(src->proxy.event_in, src);
225 _evas_event_source_events_call(src, EVAS_CALLBACK_MOUSE_DOWN, ev, event_id);
226 ev->canvas = canvas;
227 ev->output = output;
207} 228}
208 229
209static inline void 230static void
210_evas_event_pass_to_source(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas *eo_e, Evas_Coord x, Evas_Coord y, Evas_Callback_Type type, void *ev, int event_id) 231_evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas_Event_Mouse_Move *ev, int event_id)
232{
233 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
234 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
235 Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS);
236 Evas_Position cur_pos = ev->cur;
237
238 if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return;
239
240 _transform_to_src_space(obj, src, &ev->cur.canvas.x, &ev->cur.canvas.y);
241
242 ev->cur.output.x = ev->cur.canvas.x;
243 ev->cur.output.y = ev->cur.canvas.y;
244
245 //FIXME: transform previous coords also.
246 //FIXME: Needs to care the src mouse grab.
247 _evas_event_source_events_call(src, EVAS_CALLBACK_MOUSE_MOVE, ev, event_id);
248
249 //FIXME: Update the mouse out objects.
250 //FIXME: If any object isn't grabbed then get the event list again.
251
252 ev->cur = cur_pos;
253}
254
255static void
256_evas_event_source_mouse_up_events(Evas_Object *eo_obj, Evas_Event_Mouse_Up *ev, int event_id)
211{ 257{
212 if (obj->proxy.is_proxy && obj->proxy.source_events) 258 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
213 _evas_object_source_events(eo_obj, eo_e, x, y, type, ev, event_id); 259 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
260 Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS);
261 Evas_Point output = ev->output;
262 Evas_Coord_Point canvas = ev->canvas;
263
264 if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return;
265
266 _transform_to_src_space(obj, src, &ev->canvas.x, &ev->canvas.y);
267
268 ev->output.x = ev->canvas.x;
269 ev->output.y = ev->canvas.y;
270
271 //FIXME: Needs to care the src mouse grab.
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);
274
275 ev->canvas = canvas;
276 ev->output = output;
277}
278
279static void
280_evas_event_source_hold_events(Evas_Object *eo_obj, void *ev, int event_id)
281{
282 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
283 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
284 Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS);
285 if (obj->layer->evas->is_frozen) return;
286 _evas_event_source_events_call(src, EVAS_CALLBACK_HOLD, ev, event_id);
287}
288
289static void
290_evas_event_source_wheel_events(Evas_Object *eo_obj, Evas_Event_Mouse_Wheel *ev, int event_id)
291{
292 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
293 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
294 Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS);
295 Evas_Point output = ev->output;
296 Evas_Coord_Point canvas = ev->canvas;
297
298 if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return;
299
300 _transform_to_src_space(obj, src, &ev->canvas.x, &ev->canvas.y);
301
302 ev->output.x = ev->canvas.x;
303 ev->output.y = ev->canvas.y;
304
305 _evas_event_source_events_call(src, EVAS_CALLBACK_MOUSE_WHEEL, ev, event_id);
306
307 ev->canvas = canvas;
308 ev->output = output;
309}
310
311static void
312_evas_event_source_multi_down_events(Evas_Object *eo_obj, Evas_Event_Multi_Down *ev, int event_id)
313{
314 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
315 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
316 Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS);
317 Evas_Point output = ev->output;
318 Evas_Coord_Precision_Point canvas = ev->canvas;
319
320 if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return;
321
322 _transform_to_src_space(obj, src, &ev->canvas.x, &ev->canvas.y);
323 //FIXME: transform precision
324
325 ev->output.x = ev->canvas.x;
326 ev->output.y = ev->canvas.y;
327
328 //FIXME: Needs to care the src mouse grab.
329 _evas_event_source_events_call(src, EVAS_CALLBACK_MULTI_DOWN, ev, event_id);
330
331 ev->canvas = canvas;
332 ev->output = output;
333}
334
335static void
336_evas_event_source_multi_up_events(Evas_Object *eo_obj, Evas_Event_Multi_Up *ev, int event_id)
337{
338 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
339 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
340 Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS);
341 Evas_Point output = ev->output;
342 Evas_Coord_Precision_Point canvas = ev->canvas;
343
344 if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return;
345
346 _transform_to_src_space(obj, src, &ev->canvas.x, &ev->canvas.y);
347 //FIXME: transform precision
348
349 ev->output.x = ev->canvas.x;
350 ev->output.y = ev->canvas.y;
351
352 //FIXME: Needs to care the src mouse grab.
353 _evas_event_source_events_call(src, EVAS_CALLBACK_MULTI_UP, ev, event_id);
354
355 ev->canvas = canvas;
356 ev->output = output;
357}
358
359static void
360_evas_event_source_multi_move_events(Evas_Object *eo_obj, Evas_Event_Multi_Move *ev, int event_id)
361{
362 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
363 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
364 Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS);
365 Evas_Precision_Position cur_pos = ev->cur;
366
367 if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return;
368
369 _transform_to_src_space(obj, src, &ev->cur.canvas.x, &ev->cur.canvas.y);
370
371 ev->cur.output.x = ev->cur.canvas.x;
372 ev->cur.output.y = ev->cur.canvas.y;
373
374 //FIXME: Needs to care the src mouse grab.
375 _evas_event_source_events_call(src, EVAS_CALLBACK_MULTI_MOVE, ev, event_id);
376
377 //FIXME: If any object isn't grabbed then get the event list again.
378 ev->cur = cur_pos;
379}
380
381static void
382_evas_event_source_mouse_in_events(Evas_Object *eo_obj, Evas_Event_Mouse_In *ev, int event_id)
383{
384 //FIXME: Should implement again.
385 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
386 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
387 Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS);
388 Evas_Point output = ev->output;
389 Evas_Coord_Point canvas = ev->canvas;
390
391 if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return;
392
393 _transform_to_src_space(obj, src, &ev->canvas.x, &ev->canvas.y);
394
395 ev->output.x = ev->canvas.x;
396 ev->output.y = ev->canvas.y;
397
398 _evas_event_source_events_call(src, EVAS_CALLBACK_MOUSE_IN, ev, event_id);
399
400 ev->canvas = canvas;
401 ev->output = output;
402}
403
404static void
405_evas_event_source_mouse_out_events(Evas_Object *eo_obj, Evas_Event_Mouse_Out *ev, int event_id)
406{
407 //FIXME: Should implement again.
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);
410 Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS);
411 Evas_Coord_Point canvas = ev->canvas;
412
413 if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return;
414
415 _transform_to_src_space(obj, src, &ev->canvas.x, &ev->canvas.y);
416
417 ev->output.x = ev->canvas.x;
418 ev->output.y = ev->canvas.y;
419
420 _evas_event_source_events_call(src, EVAS_CALLBACK_MOUSE_OUT, ev, event_id);
421
422 ev->canvas = canvas;
423 ev->output = output;
214} 424}
215 425
216static Eina_List * 426static Eina_List *
@@ -474,9 +684,9 @@ _canvas_event_feed_mouse_down(Eo *eo_e, void *_pd, va_list *list)
474 evas_object_event_callback_call(eo_obj, obj, 684 evas_object_event_callback_call(eo_obj, obj,
475 EVAS_CALLBACK_MOUSE_DOWN, &ev, 685 EVAS_CALLBACK_MOUSE_DOWN, &ev,
476 event_id); 686 event_id);
477 _evas_event_pass_to_source(eo_obj, obj, eo_e, ev.canvas.x, 687 if ((obj->proxy.is_proxy) && (obj->proxy.source_events))
478 ev.canvas.y, EVAS_CALLBACK_MOUSE_DOWN, 688 _evas_event_source_mouse_down_events(eo_obj, eo_e, &ev,
479 &ev, event_id); 689 event_id);
480 } 690 }
481 if (e->delete_me) break; 691 if (e->delete_me) break;
482 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) 692 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
@@ -539,10 +749,9 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data)
539 evas_object_event_callback_call(eo_obj, obj, 749 evas_object_event_callback_call(eo_obj, obj,
540 EVAS_CALLBACK_MOUSE_OUT, 750 EVAS_CALLBACK_MOUSE_OUT,
541 &ev, event_id); 751 &ev, event_id);
542 _evas_event_pass_to_source(eo_obj, obj, eo_e, 752 if ((obj->proxy.is_proxy) && (obj->proxy.source_events))
543 ev.canvas.x, ev.canvas.y, 753 _evas_event_source_mouse_out_events(eo_obj, &ev,
544 EVAS_CALLBACK_MOUSE_OUT, &ev, 754 event_id);
545 event_id);
546 } 755 }
547 } 756 }
548 } 757 }
@@ -586,12 +795,11 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data)
586 { 795 {
587 evas_object_event_callback_call(eo_obj_itr, obj_itr, 796 evas_object_event_callback_call(eo_obj_itr, obj_itr,
588 EVAS_CALLBACK_MOUSE_IN, &ev_in, event_id); 797 EVAS_CALLBACK_MOUSE_IN, &ev_in, event_id);
589 _evas_event_pass_to_source(eo_obj_itr, obj_itr, 798 if ((obj_itr->proxy.is_proxy) &&
590 eo_e, ev_in.canvas.x, 799 (obj_itr->proxy.source_events))
591 ev_in.canvas.y, 800 _evas_event_source_mouse_in_events(eo_obj_itr,
592 EVAS_CALLBACK_MOUSE_IN, 801 &ev_in,
593 &ev, event_id); 802 event_id);
594
595 } 803 }
596 } 804 }
597 } 805 }
@@ -700,10 +908,9 @@ _canvas_event_feed_mouse_up(Eo *eo_e, void *_pd, va_list *list)
700 evas_object_event_callback_call(eo_obj, obj, 908 evas_object_event_callback_call(eo_obj, obj,
701 EVAS_CALLBACK_MOUSE_UP, 909 EVAS_CALLBACK_MOUSE_UP,
702 &ev, event_id); 910 &ev, event_id);
703 _evas_event_pass_to_source(eo_obj, obj, eo_e, 911 if ((obj->proxy.is_proxy) && (obj->proxy.source_events))
704 ev.canvas.x, ev.canvas.y, 912 _evas_event_source_mouse_up_events(eo_obj, &ev,
705 EVAS_CALLBACK_MOUSE_UP, 913 event_id);
706 &ev, event_id);
707 } 914 }
708 } 915 }
709 if (e->delete_me) break; 916 if (e->delete_me) break;
@@ -825,9 +1032,8 @@ _canvas_event_feed_mouse_wheel(Eo *eo_e, void *_pd, va_list *list)
825 evas_object_event_callback_call(eo_obj, obj, 1032 evas_object_event_callback_call(eo_obj, obj,
826 EVAS_CALLBACK_MOUSE_WHEEL, &ev, 1033 EVAS_CALLBACK_MOUSE_WHEEL, &ev,
827 event_id); 1034 event_id);
828 _evas_event_pass_to_source(eo_obj, obj, eo_e, ev.canvas.x, 1035 if ((obj->proxy.is_proxy) && (obj->proxy.source_events))
829 ev.canvas.y, EVAS_CALLBACK_MOUSE_WHEEL, 1036 _evas_event_source_wheel_events(eo_obj, &ev, event_id);
830 &ev, event_id);
831 } 1037 }
832 if (e->delete_me) break; 1038 if (e->delete_me) break;
833 } 1039 }
@@ -933,11 +1139,9 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list)
933 { 1139 {
934 evas_object_event_callback_call(eo_obj, obj, 1140 evas_object_event_callback_call(eo_obj, obj,
935 EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); 1141 EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id);
936 _evas_event_pass_to_source(eo_obj, obj, eo_e, 1142 if ((obj->proxy.is_proxy) && (obj->proxy.source_events))
937 ev.cur.canvas.x, 1143 _evas_event_source_mouse_move_events(eo_obj, &ev,
938 ev.cur.canvas.y, 1144 event_id);
939 EVAS_CALLBACK_MOUSE_MOVE,
940 &ev, event_id);
941 } 1145 }
942 } 1146 }
943 else 1147 else
@@ -999,11 +1203,9 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list)
999 evas_object_event_callback_call(eo_obj, 1203 evas_object_event_callback_call(eo_obj,
1000 obj, 1204 obj,
1001 EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); 1205 EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
1002 _evas_event_pass_to_source(eo_obj, obj, 1206 if ((obj->proxy.is_proxy) &&
1003 eo_e, 1207 (obj->proxy.source_events))
1004 ev.canvas.x, 1208 _evas_event_source_mouse_out_events(eo_obj, &ev, event_id);
1005 ev.canvas.y,
1006 EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
1007 } 1209 }
1008 } 1210 }
1009 } 1211 }
@@ -1096,11 +1298,9 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list)
1096 ev.cur.canvas.y = e->pointer.y; 1298 ev.cur.canvas.y = e->pointer.y;
1097 _evas_event_havemap_adjust(eo_obj, obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); 1299 _evas_event_havemap_adjust(eo_obj, obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
1098 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); 1300 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id);
1099 _evas_event_pass_to_source(eo_obj, obj, eo_e, 1301 if ((obj->proxy.is_proxy) && (obj->proxy.source_events))
1100 ev.cur.canvas.x, 1302 _evas_event_source_mouse_move_events(eo_obj,&ev,
1101 ev.cur.canvas.y, 1303 event_id);
1102 EVAS_CALLBACK_MOUSE_MOVE, &ev,
1103 event_id);
1104 } 1304 }
1105 } 1305 }
1106 /* otherwise it has left the object */ 1306 /* otherwise it has left the object */
@@ -1117,11 +1317,10 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list)
1117 { 1317 {
1118 evas_object_event_callback_call(eo_obj, obj, 1318 evas_object_event_callback_call(eo_obj, obj,
1119 EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); 1319 EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id);
1120 _evas_event_pass_to_source(eo_obj, obj, eo_e, 1320 if ((obj->proxy.is_proxy) &&
1121 ev2.canvas.x, 1321 (obj->proxy.source_events))
1122 ev2.canvas.y, 1322 _evas_event_source_mouse_out_events(eo_obj, &ev2,
1123 EVAS_CALLBACK_MOUSE_OUT, 1323 event_id);
1124 &ev2, event_id);
1125 } 1324 }
1126 } 1325 }
1127 } 1326 }
@@ -1151,11 +1350,10 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list)
1151 { 1350 {
1152 evas_object_event_callback_call(eo_obj, obj, 1351 evas_object_event_callback_call(eo_obj, obj,
1153 EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); 1352 EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2);
1154 _evas_event_pass_to_source(eo_obj, obj, eo_e, 1353 if ((obj->proxy.is_proxy) &&
1155 ev3.canvas.x, 1354 (obj->proxy.source_events))
1156 ev3.canvas.y, 1355 _evas_event_source_mouse_in_events(eo_obj, &ev3,
1157 EVAS_CALLBACK_MOUSE_IN, 1356 event_id2);
1158 &ev3, event_id2);
1159 } 1357 }
1160 } 1358 }
1161 } 1359 }
@@ -1292,11 +1490,9 @@ nogrep:
1292 _evas_event_framespace_adjust(eo_obj, &ev.cur.canvas.x, &ev.cur.canvas.y); 1490 _evas_event_framespace_adjust(eo_obj, &ev.cur.canvas.x, &ev.cur.canvas.y);
1293 _evas_event_havemap_adjust(eo_obj, obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); 1491 _evas_event_havemap_adjust(eo_obj, obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
1294 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); 1492 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id);
1295 _evas_event_pass_to_source(eo_obj, obj, eo_e, 1493 if ((obj->proxy.is_proxy) && (obj->proxy.source_events))
1296 ev.cur.canvas.x, 1494 _evas_event_source_mouse_move_events(eo_obj, &ev,
1297 ev.cur.canvas.y, 1495 event_id);
1298 EVAS_CALLBACK_MOUSE_MOVE,
1299 &ev, event_id);
1300 } 1496 }
1301 } 1497 }
1302 /* otherwise it has left the object */ 1498 /* otherwise it has left the object */
@@ -1313,11 +1509,10 @@ nogrep:
1313 { 1509 {
1314 evas_object_event_callback_call(eo_obj, obj, 1510 evas_object_event_callback_call(eo_obj, obj,
1315 EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); 1511 EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id);
1316 _evas_event_pass_to_source(eo_obj, obj, eo_e, 1512 if ((obj->proxy.is_proxy) &&
1317 ev2.canvas.x, 1513 (obj->proxy.source_events))
1318 ev2.canvas.y, 1514 _evas_event_source_mouse_out_events(eo_obj, &ev2,
1319 EVAS_CALLBACK_MOUSE_OUT, 1515 event_id);
1320 &ev2, event_id);
1321 } 1516 }
1322 } 1517 }
1323 } 1518 }
@@ -1347,11 +1542,10 @@ nogrep:
1347 { 1542 {
1348 evas_object_event_callback_call(eo_obj, obj, 1543 evas_object_event_callback_call(eo_obj, obj,
1349 EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); 1544 EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2);
1350 _evas_event_pass_to_source(eo_obj, obj, eo_e, 1545 if ((obj->proxy.is_proxy) &&
1351 ev3.canvas.x, 1546 (obj->proxy.source_events))
1352 ev3.canvas.y, 1547 _evas_event_source_mouse_in_events(eo_obj, &ev3,
1353 EVAS_CALLBACK_MOUSE_IN, 1548 event_id2);
1354 &ev3, event_id2);
1355 } 1549 }
1356 } 1550 }
1357 } 1551 }
@@ -1434,10 +1628,9 @@ _canvas_event_feed_mouse_in(Eo *eo_e, void *_pd, va_list *list)
1434 evas_object_event_callback_call(eo_obj, obj, 1628 evas_object_event_callback_call(eo_obj, obj,
1435 EVAS_CALLBACK_MOUSE_IN, 1629 EVAS_CALLBACK_MOUSE_IN,
1436 &ev, event_id); 1630 &ev, event_id);
1437 _evas_event_pass_to_source(eo_obj, obj, eo_e, 1631 if ((obj->proxy.is_proxy) && (obj->proxy.source_events))
1438 ev.canvas.x, ev.canvas.y, 1632 _evas_event_source_mouse_in_events(eo_obj, &ev,
1439 EVAS_CALLBACK_MOUSE_IN, 1633 event_id);
1440 &ev, event_id);
1441 } 1634 }
1442 } 1635 }
1443 } 1636 }
@@ -1518,10 +1711,10 @@ _canvas_event_feed_mouse_out(Eo *eo_e, void *_pd, va_list *list)
1518 { 1711 {
1519 evas_object_event_callback_call(eo_obj, obj, 1712 evas_object_event_callback_call(eo_obj, obj,
1520 EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); 1713 EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
1521 _evas_event_pass_to_source(eo_obj, obj, eo_e, 1714 if ((obj->proxy.is_proxy) &&
1522 ev.canvas.x, ev.canvas.y, 1715 (obj->proxy.source_events))
1523 EVAS_CALLBACK_MOUSE_OUT, 1716 _evas_event_source_mouse_out_events(eo_obj, &ev,
1524 &ev, event_id); 1717 event_id);
1525 } 1718 }
1526 } 1719 }
1527 obj->mouse_grabbed = 0; 1720 obj->mouse_grabbed = 0;
@@ -1641,10 +1834,8 @@ _canvas_event_feed_multi_down(Eo *eo_e, void *_pd, va_list *list)
1641 evas_object_event_callback_call(eo_obj, obj, 1834 evas_object_event_callback_call(eo_obj, obj,
1642 EVAS_CALLBACK_MULTI_DOWN, &ev, 1835 EVAS_CALLBACK_MULTI_DOWN, &ev,
1643 event_id); 1836 event_id);
1644 _evas_event_pass_to_source(eo_obj, obj, eo_e, ev.canvas.x, 1837 if ((obj->proxy.is_proxy) || (obj->proxy.source_events))
1645 ev.canvas.y, EVAS_CALLBACK_MULTI_DOWN, 1838 _evas_event_source_multi_down_events(eo_obj, &ev, event_id);
1646 &ev,
1647 event_id);
1648 } 1839 }
1649 if (e->delete_me) break; 1840 if (e->delete_me) break;
1650 } 1841 }
@@ -1752,9 +1943,8 @@ _canvas_event_feed_multi_up(Eo *eo_e, void *_pd, va_list *list)
1752 evas_object_event_callback_call(eo_obj, obj, 1943 evas_object_event_callback_call(eo_obj, obj,
1753 EVAS_CALLBACK_MULTI_UP, &ev, 1944 EVAS_CALLBACK_MULTI_UP, &ev,
1754 event_id); 1945 event_id);
1755 _evas_event_pass_to_source(eo_obj, obj, eo_e, ev.canvas.x, 1946 if ((obj->proxy.is_proxy) || (obj->proxy.source_events))
1756 ev.canvas.y, EVAS_CALLBACK_MULTI_UP, 1947 _evas_event_source_multi_up_events(eo_obj, &ev, event_id);
1757 &ev, event_id);
1758 } 1948 }
1759 if (e->delete_me) break; 1949 if (e->delete_me) break;
1760 } 1950 }
@@ -1863,10 +2053,8 @@ _canvas_event_feed_multi_move(Eo *eo_e, void *_pd, va_list *list)
1863 if (y != ev.cur.canvas.y) 2053 if (y != ev.cur.canvas.y)
1864 ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision 2054 ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision
1865 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); 2055 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id);
1866 _evas_event_pass_to_source(eo_obj, obj, eo_e, ev.cur.canvas.x, 2056 if ((obj->proxy.is_proxy) || (obj->proxy.source_events))
1867 ev.cur.canvas.y, 2057 _evas_event_source_multi_move_events(eo_obj, &ev, event_id);
1868 EVAS_CALLBACK_MULTI_MOVE, &ev,
1869 event_id);
1870 } 2058 }
1871 if (e->delete_me) break; 2059 if (e->delete_me) break;
1872 } 2060 }
@@ -1938,10 +2126,8 @@ _canvas_event_feed_multi_move(Eo *eo_e, void *_pd, va_list *list)
1938 if (y != ev.cur.canvas.y) 2126 if (y != ev.cur.canvas.y)
1939 ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision 2127 ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision
1940 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); 2128 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id);
1941 _evas_event_pass_to_source(eo_obj, obj, eo_e, 2129 if ((obj->proxy.is_proxy) || (obj->proxy.source_events))
1942 ev.cur.canvas.x, ev.cur.canvas.y, 2130 _evas_event_source_multi_move_events(eo_obj, &ev, event_id);
1943 EVAS_CALLBACK_MULTI_MOVE, &ev,
1944 event_id);
1945 } 2131 }
1946 if (e->delete_me) break; 2132 if (e->delete_me) break;
1947 } 2133 }
@@ -2037,10 +2223,6 @@ _canvas_event_feed_key_down(Eo *eo_e, void *_pd, va_list *list)
2037 evas_object_event_callback_call(g->object, 2223 evas_object_event_callback_call(g->object,
2038 object_obj, 2224 object_obj,
2039 EVAS_CALLBACK_KEY_DOWN, &ev, event_id); 2225 EVAS_CALLBACK_KEY_DOWN, &ev, event_id);
2040 _evas_event_pass_to_source(g->object, object_obj,
2041 eo_e, 0, 0,
2042 EVAS_CALLBACK_KEY_DOWN,
2043 &ev, event_id);
2044 } 2226 }
2045 if (g->exclusive) exclusive = EINA_TRUE; 2227 if (g->exclusive) exclusive = EINA_TRUE;
2046 } 2228 }
@@ -2071,14 +2253,9 @@ _canvas_event_feed_key_down(Eo *eo_e, void *_pd, va_list *list)
2071 { 2253 {
2072 Evas_Object_Protected_Data *focused_obj = eo_data_get(e->focused, EVAS_OBJ_CLASS); 2254 Evas_Object_Protected_Data *focused_obj = eo_data_get(e->focused, EVAS_OBJ_CLASS);
2073 if (!e->is_frozen && !evas_event_freezes_through(e->focused, focused_obj)) 2255 if (!e->is_frozen && !evas_event_freezes_through(e->focused, focused_obj))
2074 {
2075 evas_object_event_callback_call(e->focused, focused_obj, 2256 evas_object_event_callback_call(e->focused, focused_obj,
2076 EVAS_CALLBACK_KEY_DOWN, 2257 EVAS_CALLBACK_KEY_DOWN,
2077 &ev, event_id); 2258 &ev, event_id);
2078 _evas_event_pass_to_source(e->focused, focused_obj, eo_e, 0, 0,
2079 EVAS_CALLBACK_KEY_DOWN,
2080 &ev, event_id);
2081 }
2082 } 2259 }
2083 _evas_post_event_callback_call(eo_e, e); 2260 _evas_post_event_callback_call(eo_e, e);
2084 if (ev.dev) _evas_device_unref(ev.dev); 2261 if (ev.dev) _evas_device_unref(ev.dev);
@@ -2157,9 +2334,6 @@ _canvas_event_feed_key_up(Eo *eo_e, void *_pd, va_list *list)
2157 evas_object_event_callback_call(g->object, object_obj, 2334 evas_object_event_callback_call(g->object, object_obj,
2158 EVAS_CALLBACK_KEY_UP, 2335 EVAS_CALLBACK_KEY_UP,
2159 &ev, event_id); 2336 &ev, event_id);
2160 _evas_event_pass_to_source(g->object, object_obj, eo_e,
2161 0, 0, EVAS_CALLBACK_KEY_UP,
2162 &ev, event_id);
2163 } 2337 }
2164 if (g->exclusive) exclusive = EINA_TRUE; 2338 if (g->exclusive) exclusive = EINA_TRUE;
2165 } 2339 }
@@ -2191,14 +2365,9 @@ _canvas_event_feed_key_up(Eo *eo_e, void *_pd, va_list *list)
2191 { 2365 {
2192 Evas_Object_Protected_Data *focused_obj = eo_data_get(e->focused, EVAS_OBJ_CLASS); 2366 Evas_Object_Protected_Data *focused_obj = eo_data_get(e->focused, EVAS_OBJ_CLASS);
2193 if (!e->is_frozen && !evas_event_freezes_through(e->focused, focused_obj)) 2367 if (!e->is_frozen && !evas_event_freezes_through(e->focused, focused_obj))
2194 {
2195 evas_object_event_callback_call(e->focused, focused_obj, 2368 evas_object_event_callback_call(e->focused, focused_obj,
2196 EVAS_CALLBACK_KEY_UP, 2369 EVAS_CALLBACK_KEY_UP,
2197 &ev, event_id); 2370 &ev, event_id);
2198 _evas_event_pass_to_source(e->focused, focused_obj, eo_e, 0, 0,
2199 EVAS_CALLBACK_KEY_UP,
2200 &ev, event_id);
2201 }
2202 } 2371 }
2203 _evas_post_event_callback_call(eo_e, e); 2372 _evas_post_event_callback_call(eo_e, e);
2204 if (ev.dev) _evas_device_unref(ev.dev); 2373 if (ev.dev) _evas_device_unref(ev.dev);
@@ -2246,8 +2415,8 @@ _canvas_event_feed_hold(Eo *eo_e, void *_pd, va_list *list)
2246 { 2415 {
2247 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HOLD, 2416 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HOLD,
2248 &ev, event_id); 2417 &ev, event_id);
2249 _evas_event_pass_to_source(eo_obj, obj, eo_e, EVAS_CALLBACK_HOLD, 2418 if ((obj->proxy.is_proxy) && (obj->proxy.source_events))
2250 0, 0, &ev, event_id); 2419 _evas_event_source_hold_events(eo_obj, &ev, event_id);
2251 } 2420 }
2252 if (e->delete_me) break; 2421 if (e->delete_me) break;
2253 } 2422 }
diff --git a/legacy/evas/src/lib/include/evas_private.h b/legacy/evas/src/lib/include/evas_private.h
index 6ce431a7b9..e7e0e726bb 100644
--- a/legacy/evas/src/lib/include/evas_private.h
+++ b/legacy/evas/src/lib/include/evas_private.h
@@ -595,6 +595,7 @@ struct _Evas_Object_Protected_Data
595 Eina_List *proxies; 595 Eina_List *proxies;
596 void *surface; 596 void *surface;
597 int w,h; 597 int w,h;
598 Eina_List *event_in;
598 Eina_Bool redraw : 1; 599 Eina_Bool redraw : 1;
599 Eina_Bool is_proxy : 1; 600 Eina_Bool is_proxy : 1;
600 Eina_Bool source_invisible : 1; 601 Eina_Bool source_invisible : 1;