aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/lib/canvas/evas_events.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-23 23:30:42 +1000
committerDavid Walter Seikel2012-01-23 23:30:42 +1000
commit825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch)
tree75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/evas/src/lib/canvas/evas_events.c
parentAdd ability to disable the test harness, or the Lua compile test. (diff)
downloadSledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip
SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz
SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2
SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to '')
-rw-r--r--libraries/evas/src/lib/canvas/evas_events.c520
1 files changed, 398 insertions, 122 deletions
diff --git a/libraries/evas/src/lib/canvas/evas_events.c b/libraries/evas/src/lib/canvas/evas_events.c
index 99ecf8c..9b7077e 100644
--- a/libraries/evas/src/lib/canvas/evas_events.c
+++ b/libraries/evas/src/lib/canvas/evas_events.c
@@ -1,6 +1,11 @@
1#include "evas_common.h" 1#include "evas_common.h"
2#include "evas_private.h" 2#include "evas_private.h"
3 3
4static Eina_List *
5_evas_event_object_list_in_get(Evas *e, Eina_List *in,
6 const Eina_Inlist *list, Evas_Object *stop,
7 int x, int y, int *no_rep);
8
4static void 9static void
5_evas_event_havemap_adjust(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Eina_Bool mouse_grabbed) 10_evas_event_havemap_adjust(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Eina_Bool mouse_grabbed)
6{ 11{
@@ -16,13 +21,17 @@ _evas_event_havemap_adjust(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Eina_
16} 21}
17 22
18static Eina_List * 23static Eina_List *
19_evas_event_object_list_in_get(Evas *e, Eina_List *in, 24_evas_event_object_list_raw_in_get(Evas *e, Eina_List *in,
20 const Eina_Inlist *list, Evas_Object *stop, 25 const Eina_Inlist *list, Evas_Object *stop,
21 int x, int y, int *no_rep) 26 int x, int y, int *no_rep)
22{ 27{
23 Evas_Object *obj; 28 Evas_Object *obj;
29 int inside;
30
24 if (!list) return in; 31 if (!list) return in;
25 EINA_INLIST_REVERSE_FOREACH(list, obj) 32 for (obj = _EINA_INLIST_CONTAINER(obj, list);
33 obj;
34 obj = _EINA_INLIST_CONTAINER(obj, EINA_INLIST_GET(obj)->prev))
26 { 35 {
27 if (obj == stop) 36 if (obj == stop)
28 { 37 {
@@ -37,9 +46,9 @@ _evas_event_object_list_in_get(Evas *e, Eina_List *in,
37 if (obj->smart.smart) 46 if (obj->smart.smart)
38 { 47 {
39 int norep = 0; 48 int norep = 0;
40 int inside;
41 49
42 if (((obj->cur.usemap) && (obj->cur.map) && (obj->cur.map->count == 4))) 50 if ((obj->cur.usemap) && (obj->cur.map) &&
51 (obj->cur.map->count == 4))
43 { 52 {
44 inside = evas_object_is_in_output_rect(obj, x, y, 1, 1); 53 inside = evas_object_is_in_output_rect(obj, x, y, 1, 1);
45 if (inside) 54 if (inside)
@@ -57,7 +66,8 @@ _evas_event_object_list_in_get(Evas *e, Eina_List *in,
57 evas_object_smart_members_get_direct(obj), 66 evas_object_smart_members_get_direct(obj),
58 stop, 67 stop,
59 obj->cur.geometry.x + obj->cur.map->mx, 68 obj->cur.geometry.x + obj->cur.map->mx,
60 obj->cur.geometry.y + obj->cur.map->my, &norep); 69 obj->cur.geometry.y + obj->cur.map->my,
70 &norep);
61 } 71 }
62 } 72 }
63 } 73 }
@@ -69,19 +79,24 @@ _evas_event_object_list_in_get(Evas *e, Eina_List *in,
69 } 79 }
70 if (norep) 80 if (norep)
71 { 81 {
72 if (!obj->repeat_events) *no_rep = 1; 82 if (!obj->repeat_events)
73 return in; 83 {
84 *no_rep = 1;
85 return in;
86 }
74 } 87 }
75 } 88 }
76 else 89 else
77 { 90 {
78 int inside = evas_object_is_in_output_rect(obj, x, y, 1, 1); 91 inside = evas_object_is_in_output_rect(obj, x, y, 1, 1);
79 92
80 if (((obj->cur.usemap) && (obj->cur.map) && (obj->cur.map->count == 4))) 93 if ((obj->cur.usemap) && (obj->cur.map) &&
94 (obj->cur.map->count == 4))
81 { 95 {
82 if ((inside) && (!evas_map_coords_get(obj->cur.map, x, y, 96 if ((inside) &&
83 &(obj->cur.map->mx), 97 (!evas_map_coords_get(obj->cur.map, x, y,
84 &(obj->cur.map->my), 0))) 98 &(obj->cur.map->mx),
99 &(obj->cur.map->my), 0)))
85 { 100 {
86 inside = 0; 101 inside = 0;
87 } 102 }
@@ -105,6 +120,16 @@ _evas_event_object_list_in_get(Evas *e, Eina_List *in,
105 return in; 120 return in;
106} 121}
107 122
123static Eina_List *
124_evas_event_object_list_in_get(Evas *e, Eina_List *in,
125 const Eina_Inlist *list, Evas_Object *stop,
126 int x, int y, int *no_rep)
127{
128 if (!list) return NULL;
129 return _evas_event_object_list_raw_in_get(e, in, list->last, stop,
130 x, y, no_rep);
131}
132
108Eina_List * 133Eina_List *
109evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y) 134evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y)
110{ 135{
@@ -136,6 +161,24 @@ evas_event_list_copy(Eina_List *list)
136/* public functions */ 161/* public functions */
137 162
138EAPI void 163EAPI void
164evas_event_default_flags_set(Evas *e, Evas_Event_Flags flags)
165{
166 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
167 return;
168 MAGIC_CHECK_END();
169 e->default_event_flags = flags;
170}
171
172EAPI Evas_Event_Flags
173evas_event_default_flags_get(const Evas *e)
174{
175 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
176 return EVAS_EVENT_FLAG_ON_HOLD;
177 MAGIC_CHECK_END();
178 return e->default_event_flags;
179}
180
181EAPI void
139evas_event_freeze(Evas *e) 182evas_event_freeze(Evas *e)
140{ 183{
141 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 184 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
@@ -197,6 +240,8 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int
197 Eina_List *l, *copy; 240 Eina_List *l, *copy;
198 Evas_Event_Mouse_Down ev; 241 Evas_Event_Mouse_Down ev;
199 Evas_Object *obj; 242 Evas_Object *obj;
243 int addgrab = 0;
244 int event_id = 0;
200 245
201 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 246 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
202 return; 247 return;
@@ -205,12 +250,14 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int
205 if ((b < 1) || (b > 32)) return; 250 if ((b < 1) || (b > 32)) return;
206 251
207 e->pointer.button |= (1 << (b - 1)); 252 e->pointer.button |= (1 << (b - 1));
253 e->pointer.downs++;
208 254
209 if (e->events_frozen > 0) return; 255 if (e->events_frozen > 0) return;
210 e->last_timestamp = timestamp; 256 e->last_timestamp = timestamp;
211 257
212 _evas_object_event_new(); 258 _evas_object_event_new();
213 259
260 event_id = _evas_event_counter;
214 ev.button = b; 261 ev.button = b;
215 ev.output.x = e->pointer.x; 262 ev.output.x = e->pointer.x;
216 ev.output.y = e->pointer.y; 263 ev.output.y = e->pointer.y;
@@ -221,7 +268,7 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int
221 ev.locks = &(e->locks); 268 ev.locks = &(e->locks);
222 ev.flags = flags; 269 ev.flags = flags;
223 ev.timestamp = timestamp; 270 ev.timestamp = timestamp;
224 ev.event_flags = EVAS_EVENT_FLAG_NONE; 271 ev.event_flags = e->default_event_flags;
225 272
226 _evas_walk(e); 273 _evas_walk(e);
227 /* append new touch point to the touch point list */ 274 /* append new touch point to the touch point list */
@@ -238,14 +285,23 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int
238 e->pointer.object.in = eina_list_free(e->pointer.object.in); 285 e->pointer.object.in = eina_list_free(e->pointer.object.in);
239 /* and set up the new one */ 286 /* and set up the new one */
240 e->pointer.object.in = ins; 287 e->pointer.object.in = ins;
288 /* adjust grabbed count by the nuymber of currently held down
289 * fingers/buttons */
290 if (e->pointer.downs > 1) addgrab = e->pointer.downs - 1;
241 } 291 }
242 copy = evas_event_list_copy(e->pointer.object.in); 292 copy = evas_event_list_copy(e->pointer.object.in);
243 EINA_LIST_FOREACH(copy, l, obj) 293 EINA_LIST_FOREACH(copy, l, obj)
244 { 294 {
245 if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) 295 if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) ||
296 (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN))
246 { 297 {
247 obj->mouse_grabbed++; 298 obj->mouse_grabbed += addgrab + 1;
248 e->pointer.mouse_grabbed++; 299 e->pointer.mouse_grabbed += addgrab + 1;
300 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
301 {
302 e->pointer.nogrep++;
303 break;
304 }
249 } 305 }
250 } 306 }
251 EINA_LIST_FOREACH(copy, l, obj) 307 EINA_LIST_FOREACH(copy, l, obj)
@@ -256,8 +312,10 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int
256 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); 312 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
257 313
258 if (e->events_frozen <= 0) 314 if (e->events_frozen <= 0)
259 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev); 315 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev, event_id);
260 if (e->delete_me) break; 316 if (e->delete_me) break;
317 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
318 break;
261 } 319 }
262 if (copy) eina_list_free(copy); 320 if (copy) eina_list_free(copy);
263 e->last_mouse_down_counter++; 321 e->last_mouse_down_counter++;
@@ -274,9 +332,11 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data)
274 Evas_Event_Mouse_Out ev; 332 Evas_Event_Mouse_Out ev;
275 Evas_Object *obj; 333 Evas_Object *obj;
276 int post_called = 0; 334 int post_called = 0;
335 int event_id = 0;
277 336
278 _evas_object_event_new(); 337 _evas_object_event_new();
279 338
339 event_id = _evas_event_counter;
280 ev.buttons = e->pointer.button; 340 ev.buttons = e->pointer.button;
281 ev.output.x = e->pointer.x; 341 ev.output.x = e->pointer.x;
282 ev.output.y = e->pointer.y; 342 ev.output.y = e->pointer.y;
@@ -286,7 +346,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data)
286 ev.modifiers = &(e->modifiers); 346 ev.modifiers = &(e->modifiers);
287 ev.locks = &(e->locks); 347 ev.locks = &(e->locks);
288 ev.timestamp = timestamp; 348 ev.timestamp = timestamp;
289 ev.event_flags = EVAS_EVENT_FLAG_NONE; 349 ev.event_flags = e->default_event_flags;
290 350
291 /* get new list of ins */ 351 /* get new list of ins */
292 ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y); 352 ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y);
@@ -304,7 +364,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data)
304 { 364 {
305 obj->mouse_in = 0; 365 obj->mouse_in = 0;
306 if (e->events_frozen <= 0) 366 if (e->events_frozen <= 0)
307 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); 367 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
308 } 368 }
309 } 369 }
310 if (e->delete_me) break; 370 if (e->delete_me) break;
@@ -319,6 +379,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data)
319 379
320 _evas_object_event_new(); 380 _evas_object_event_new();
321 381
382 event_id = _evas_event_counter;
322 ev_in.buttons = e->pointer.button; 383 ev_in.buttons = e->pointer.button;
323 ev_in.output.x = e->pointer.x; 384 ev_in.output.x = e->pointer.x;
324 ev_in.output.y = e->pointer.y; 385 ev_in.output.y = e->pointer.y;
@@ -328,7 +389,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data)
328 ev_in.modifiers = &(e->modifiers); 389 ev_in.modifiers = &(e->modifiers);
329 ev_in.locks = &(e->locks); 390 ev_in.locks = &(e->locks);
330 ev_in.timestamp = timestamp; 391 ev_in.timestamp = timestamp;
331 ev_in.event_flags = EVAS_EVENT_FLAG_NONE; 392 ev_in.event_flags = e->default_event_flags;
332 393
333 EINA_LIST_FOREACH(ins, l, obj_itr) 394 EINA_LIST_FOREACH(ins, l, obj_itr)
334 { 395 {
@@ -341,7 +402,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data)
341 { 402 {
342 obj_itr->mouse_in = 1; 403 obj_itr->mouse_in = 1;
343 if (e->events_frozen <= 0) 404 if (e->events_frozen <= 0)
344 evas_object_event_callback_call(obj_itr, EVAS_CALLBACK_MOUSE_IN, &ev_in); 405 evas_object_event_callback_call(obj_itr, EVAS_CALLBACK_MOUSE_IN, &ev_in, event_id);
345 } 406 }
346 } 407 }
347 if (e->delete_me) break; 408 if (e->delete_me) break;
@@ -383,6 +444,7 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
383 if ((b < 1) || (b > 32)) return; 444 if ((b < 1) || (b > 32)) return;
384 445
385 e->pointer.button &= ~(1 << (b - 1)); 446 e->pointer.button &= ~(1 << (b - 1));
447 e->pointer.downs--;
386 448
387 if (e->events_frozen > 0) return; 449 if (e->events_frozen > 0) return;
388 e->last_timestamp = timestamp; 450 e->last_timestamp = timestamp;
@@ -390,9 +452,11 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
390 { 452 {
391 Evas_Event_Mouse_Up ev; 453 Evas_Event_Mouse_Up ev;
392 Evas_Object *obj; 454 Evas_Object *obj;
455 int event_id = 0;
393 456
394 _evas_object_event_new(); 457 _evas_object_event_new();
395 458
459 event_id = _evas_event_counter;
396 ev.button = b; 460 ev.button = b;
397 ev.output.x = e->pointer.x; 461 ev.output.x = e->pointer.x;
398 ev.output.y = e->pointer.y; 462 ev.output.y = e->pointer.y;
@@ -403,7 +467,7 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
403 ev.locks = &(e->locks); 467 ev.locks = &(e->locks);
404 ev.flags = flags; 468 ev.flags = flags;
405 ev.timestamp = timestamp; 469 ev.timestamp = timestamp;
406 ev.event_flags = EVAS_EVENT_FLAG_NONE; 470 ev.event_flags = e->default_event_flags;
407 471
408 _evas_walk(e); 472 _evas_walk(e);
409 /* update released touch point */ 473 /* update released touch point */
@@ -414,7 +478,7 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
414 ev.canvas.x = e->pointer.x; 478 ev.canvas.x = e->pointer.x;
415 ev.canvas.y = e->pointer.y; 479 ev.canvas.y = e->pointer.y;
416 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); 480 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
417 if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) && 481 if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) &&
418 (obj->mouse_grabbed > 0)) 482 (obj->mouse_grabbed > 0))
419 { 483 {
420 obj->mouse_grabbed--; 484 obj->mouse_grabbed--;
@@ -423,9 +487,14 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
423 if (!obj->delete_me) 487 if (!obj->delete_me)
424 { 488 {
425 if (e->events_frozen <= 0) 489 if (e->events_frozen <= 0)
426 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev); 490 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev, event_id);
427 } 491 }
428 if (e->delete_me) break; 492 if (e->delete_me) break;
493 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
494 {
495 if (e->pointer.nogrep > 0) e->pointer.nogrep--;
496 break;
497 }
429 } 498 }
430 if (copy) copy = eina_list_free(copy); 499 if (copy) copy = eina_list_free(copy);
431 e->last_mouse_up_counter++; 500 e->last_mouse_up_counter++;
@@ -442,9 +511,9 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
442 ERR("BUG? e->pointer.mouse_grabbed (=%d) < 0!", 511 ERR("BUG? e->pointer.mouse_grabbed (=%d) < 0!",
443 e->pointer.mouse_grabbed); 512 e->pointer.mouse_grabbed);
444 } 513 }
445 /* remove released touch point from the touch point list */ 514 /* remove released touch point from the touch point list */
446 _evas_touch_point_remove(e, 0); 515 _evas_touch_point_remove(e, 0);
447 516
448 _evas_unwalk(e); 517 _evas_unwalk(e);
449} 518}
450 519
@@ -465,6 +534,7 @@ evas_event_feed_mouse_cancel(Evas *e, unsigned int timestamp, const void *data)
465 if ((e->pointer.button & (1 << i))) 534 if ((e->pointer.button & (1 << i)))
466 evas_event_feed_mouse_up(e, i + 1, 0, timestamp, data); 535 evas_event_feed_mouse_up(e, i + 1, 0, timestamp, data);
467 } 536 }
537 // FIXME: multi cancel too?
468 _evas_unwalk(e); 538 _evas_unwalk(e);
469} 539}
470 540
@@ -474,6 +544,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam
474 Eina_List *l, *copy; 544 Eina_List *l, *copy;
475 Evas_Event_Mouse_Wheel ev; 545 Evas_Event_Mouse_Wheel ev;
476 Evas_Object *obj; 546 Evas_Object *obj;
547 int event_id = 0;
477 548
478 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 549 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
479 return; 550 return;
@@ -484,6 +555,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam
484 555
485 _evas_object_event_new(); 556 _evas_object_event_new();
486 557
558 event_id = _evas_event_counter;
487 ev.direction = direction; 559 ev.direction = direction;
488 ev.z = z; 560 ev.z = z;
489 ev.output.x = e->pointer.x; 561 ev.output.x = e->pointer.x;
@@ -494,7 +566,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam
494 ev.modifiers = &(e->modifiers); 566 ev.modifiers = &(e->modifiers);
495 ev.locks = &(e->locks); 567 ev.locks = &(e->locks);
496 ev.timestamp = timestamp; 568 ev.timestamp = timestamp;
497 ev.event_flags = EVAS_EVENT_FLAG_NONE; 569 ev.event_flags = e->default_event_flags;
498 570
499 _evas_walk(e); 571 _evas_walk(e);
500 copy = evas_event_list_copy(e->pointer.object.in); 572 copy = evas_event_list_copy(e->pointer.object.in);
@@ -505,7 +577,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam
505 ev.canvas.y = e->pointer.y; 577 ev.canvas.y = e->pointer.y;
506 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); 578 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
507 if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj)) 579 if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj))
508 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev); 580 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev, event_id);
509 if (e->delete_me) break; 581 if (e->delete_me) break;
510 } 582 }
511 if (copy) copy = eina_list_free(copy); 583 if (copy) copy = eina_list_free(copy);
@@ -517,6 +589,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam
517EAPI void 589EAPI void
518evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const void *data) 590evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const void *data)
519{ 591{
592 Evas_Object *nogrep_obj = NULL;
520 int px, py; 593 int px, py;
521//// Evas_Coord pcx, pcy; 594//// Evas_Coord pcx, pcy;
522 595
@@ -553,9 +626,11 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
553 { 626 {
554 Evas_Event_Mouse_Move ev; 627 Evas_Event_Mouse_Move ev;
555 Evas_Object *obj; 628 Evas_Object *obj;
629 int event_id = 0;
556 630
557 _evas_object_event_new(); 631 _evas_object_event_new();
558 632
633 event_id = _evas_event_counter;
559 ev.buttons = e->pointer.button; 634 ev.buttons = e->pointer.button;
560 ev.cur.output.x = e->pointer.x; 635 ev.cur.output.x = e->pointer.x;
561 ev.cur.output.y = e->pointer.y; 636 ev.cur.output.y = e->pointer.y;
@@ -569,7 +644,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
569 ev.modifiers = &(e->modifiers); 644 ev.modifiers = &(e->modifiers);
570 ev.locks = &(e->locks); 645 ev.locks = &(e->locks);
571 ev.timestamp = timestamp; 646 ev.timestamp = timestamp;
572 ev.event_flags = EVAS_EVENT_FLAG_NONE; 647 ev.event_flags = e->default_event_flags;
573 copy = evas_event_list_copy(e->pointer.object.in); 648 copy = evas_event_list_copy(e->pointer.object.in);
574 EINA_LIST_FOREACH(copy, l, obj) 649 EINA_LIST_FOREACH(copy, l, obj)
575 { 650 {
@@ -586,19 +661,28 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
586 (!obj->clip.clipees)) 661 (!obj->clip.clipees))
587 { 662 {
588 if ((px != x) || (py != y)) 663 if ((px != x) || (py != y))
589 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev); 664 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id);
590 } 665 }
591 else 666 else
592 outs = eina_list_append(outs, obj); 667 outs = eina_list_append(outs, obj);
668 if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) &&
669 (e->pointer.nogrep > 0))
670 {
671 eina_list_free(copy);
672 nogrep_obj = obj;
673 goto nogrep;
674 }
593 if (e->delete_me) break; 675 if (e->delete_me) break;
594 } 676 }
595 _evas_post_event_callback_call(e); 677 _evas_post_event_callback_call(e);
596 } 678 }
597 { 679 {
598 Evas_Event_Mouse_Out ev; 680 Evas_Event_Mouse_Out ev;
681 int event_id = 0;
599 682
600 _evas_object_event_new(); 683 _evas_object_event_new();
601 684
685 event_id = _evas_event_counter;
602 ev.buttons = e->pointer.button; 686 ev.buttons = e->pointer.button;
603 ev.output.x = e->pointer.x; 687 ev.output.x = e->pointer.x;
604 ev.output.y = e->pointer.y; 688 ev.output.y = e->pointer.y;
@@ -608,7 +692,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
608 ev.modifiers = &(e->modifiers); 692 ev.modifiers = &(e->modifiers);
609 ev.locks = &(e->locks); 693 ev.locks = &(e->locks);
610 ev.timestamp = timestamp; 694 ev.timestamp = timestamp;
611 ev.event_flags = EVAS_EVENT_FLAG_NONE; 695 ev.event_flags = e->default_event_flags;
612 696
613 if (copy) eina_list_free(copy); 697 if (copy) eina_list_free(copy);
614 while (outs) 698 while (outs)
@@ -629,7 +713,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
629 if (!obj->delete_me) 713 if (!obj->delete_me)
630 { 714 {
631 if (e->events_frozen <= 0) 715 if (e->events_frozen <= 0)
632 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); 716 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
633 } 717 }
634 } 718 }
635 } 719 }
@@ -645,9 +729,11 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
645 Evas_Event_Mouse_Out ev2; 729 Evas_Event_Mouse_Out ev2;
646 Evas_Event_Mouse_In ev3; 730 Evas_Event_Mouse_In ev3;
647 Evas_Object *obj; 731 Evas_Object *obj;
732 int event_id = 0, event_id2 = 0;
648 733
649 _evas_object_event_new(); 734 _evas_object_event_new();
650 735
736 event_id = _evas_event_counter;
651 ev.buttons = e->pointer.button; 737 ev.buttons = e->pointer.button;
652 ev.cur.output.x = e->pointer.x; 738 ev.cur.output.x = e->pointer.x;
653 ev.cur.output.y = e->pointer.y; 739 ev.cur.output.y = e->pointer.y;
@@ -661,7 +747,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
661 ev.modifiers = &(e->modifiers); 747 ev.modifiers = &(e->modifiers);
662 ev.locks = &(e->locks); 748 ev.locks = &(e->locks);
663 ev.timestamp = timestamp; 749 ev.timestamp = timestamp;
664 ev.event_flags = EVAS_EVENT_FLAG_NONE; 750 ev.event_flags = e->default_event_flags;
665 751
666 ev2.buttons = e->pointer.button; 752 ev2.buttons = e->pointer.button;
667 ev2.output.x = e->pointer.x; 753 ev2.output.x = e->pointer.x;
@@ -672,7 +758,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
672 ev2.modifiers = &(e->modifiers); 758 ev2.modifiers = &(e->modifiers);
673 ev2.locks = &(e->locks); 759 ev2.locks = &(e->locks);
674 ev2.timestamp = timestamp; 760 ev2.timestamp = timestamp;
675 ev2.event_flags = EVAS_EVENT_FLAG_NONE; 761 ev2.event_flags = e->default_event_flags;
676 762
677 ev3.buttons = e->pointer.button; 763 ev3.buttons = e->pointer.button;
678 ev3.output.x = e->pointer.x; 764 ev3.output.x = e->pointer.x;
@@ -683,7 +769,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
683 ev3.modifiers = &(e->modifiers); 769 ev3.modifiers = &(e->modifiers);
684 ev3.locks = &(e->locks); 770 ev3.locks = &(e->locks);
685 ev3.timestamp = timestamp; 771 ev3.timestamp = timestamp;
686 ev3.event_flags = EVAS_EVENT_FLAG_NONE; 772 ev3.event_flags = e->default_event_flags;
687 773
688 /* get all new in objects */ 774 /* get all new in objects */
689 ins = evas_event_objects_event_list(e, NULL, x, y); 775 ins = evas_event_objects_event_list(e, NULL, x, y);
@@ -711,7 +797,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
711 ev.cur.canvas.x = e->pointer.x; 797 ev.cur.canvas.x = e->pointer.x;
712 ev.cur.canvas.y = e->pointer.y; 798 ev.cur.canvas.y = e->pointer.y;
713 _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); 799 _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
714 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev); 800 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id);
715 } 801 }
716 } 802 }
717 /* otherwise it has left the object */ 803 /* otherwise it has left the object */
@@ -724,7 +810,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
724 ev2.canvas.y = e->pointer.y; 810 ev2.canvas.y = e->pointer.y;
725 _evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed); 811 _evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed);
726 if (e->events_frozen <= 0) 812 if (e->events_frozen <= 0)
727 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2); 813 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id);
728 } 814 }
729 } 815 }
730 if (e->delete_me) break; 816 if (e->delete_me) break;
@@ -733,6 +819,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
733 819
734 _evas_object_event_new(); 820 _evas_object_event_new();
735 821
822 event_id2 = _evas_event_counter;
736 if (copy) copy = eina_list_free(copy); 823 if (copy) copy = eina_list_free(copy);
737 /* go thru our current list of ins */ 824 /* go thru our current list of ins */
738 EINA_LIST_FOREACH(ins, l, obj) 825 EINA_LIST_FOREACH(ins, l, obj)
@@ -747,7 +834,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
747 { 834 {
748 obj->mouse_in = 1; 835 obj->mouse_in = 1;
749 if (e->events_frozen <= 0) 836 if (e->events_frozen <= 0)
750 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3); 837 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2);
751 } 838 }
752 } 839 }
753 if (e->delete_me) break; 840 if (e->delete_me) break;
@@ -766,6 +853,160 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
766 } 853 }
767 _evas_post_event_callback_call(e); 854 _evas_post_event_callback_call(e);
768 } 855 }
856 _evas_unwalk(e);
857 return;
858nogrep:
859 {
860 Eina_List *ins = NULL;
861 Eina_List *newin = NULL;
862 Eina_List *l, *copy, *lst = NULL;
863 Evas_Event_Mouse_Move ev;
864 Evas_Event_Mouse_Out ev2;
865 Evas_Event_Mouse_In ev3;
866 Evas_Object *obj, *below_obj;
867 int event_id = 0, event_id2 = 0;
868 int norep = 0, breaknext = 0;
869
870 _evas_object_event_new();
871
872 event_id = _evas_event_counter;
873 ev.buttons = e->pointer.button;
874 ev.cur.output.x = e->pointer.x;
875 ev.cur.output.y = e->pointer.y;
876 ev.cur.canvas.x = e->pointer.x;
877 ev.cur.canvas.y = e->pointer.y;
878 ev.prev.output.x = px;
879 ev.prev.output.y = py;
880 ev.prev.canvas.x = px;
881 ev.prev.canvas.y = py;
882 ev.data = (void *)data;
883 ev.modifiers = &(e->modifiers);
884 ev.locks = &(e->locks);
885 ev.timestamp = timestamp;
886 ev.event_flags = e->default_event_flags;
887
888 ev2.buttons = e->pointer.button;
889 ev2.output.x = e->pointer.x;
890 ev2.output.y = e->pointer.y;
891 ev2.canvas.x = e->pointer.x;
892 ev2.canvas.y = e->pointer.y;
893 ev2.data = (void *)data;
894 ev2.modifiers = &(e->modifiers);
895 ev2.locks = &(e->locks);
896 ev2.timestamp = timestamp;
897 ev2.event_flags = e->default_event_flags;
898
899 ev3.buttons = e->pointer.button;
900 ev3.output.x = e->pointer.x;
901 ev3.output.y = e->pointer.y;
902 ev3.canvas.x = e->pointer.x;
903 ev3.canvas.y = e->pointer.y;
904 ev3.data = (void *)data;
905 ev3.modifiers = &(e->modifiers);
906 ev3.locks = &(e->locks);
907 ev3.timestamp = timestamp;
908 ev3.event_flags = e->default_event_flags;
909
910 /* go thru old list of in objects */
911 copy = evas_event_list_copy(e->pointer.object.in);
912 EINA_LIST_FOREACH(copy, l, obj)
913 {
914 if (breaknext)
915 {
916 lst = l;
917 break;
918 }
919 if (obj == nogrep_obj) breaknext = 1;
920 }
921
922 /* get all new in objects */
923 below_obj = evas_object_below_get(nogrep_obj);
924 if (below_obj)
925 ins = _evas_event_object_list_raw_in_get(e, NULL,
926 EINA_INLIST_GET(below_obj), NULL,
927 e->pointer.x, e->pointer.y,
928 &norep);
929 EINA_LIST_FOREACH(copy, l, obj)
930 {
931 newin = eina_list_append(newin, obj);
932 if (obj == nogrep_obj) break;
933 }
934 EINA_LIST_FOREACH(ins, l, obj)
935 {
936 newin = eina_list_append(newin, obj);
937 }
938
939 EINA_LIST_FOREACH(lst, l, obj)
940 {
941 /* if its under the pointer and its visible and its in the new */
942 /* in list */
943 // FIXME: i don't think we need this
944 // evas_object_clip_recalc(obj);
945 if ((e->events_frozen <= 0) &&
946 evas_object_is_in_output_rect(obj, x, y, 1, 1) &&
947 (evas_object_clippers_is_visible(obj) ||
948 obj->mouse_grabbed) &&
949 eina_list_data_find(newin, obj) &&
950 (!evas_event_passes_through(obj)) &&
951 (!evas_event_freezes_through(obj)) &&
952 (!obj->clip.clipees) &&
953 ((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y))
954 )
955 {
956 if ((px != x) || (py != y))
957 {
958 ev.cur.canvas.x = e->pointer.x;
959 ev.cur.canvas.y = e->pointer.y;
960 _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
961 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id);
962 }
963 }
964 /* otherwise it has left the object */
965 else
966 {
967 if (obj->mouse_in)
968 {
969 obj->mouse_in = 0;
970 ev2.canvas.x = e->pointer.x;
971 ev2.canvas.y = e->pointer.y;
972 _evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed);
973 if (e->events_frozen <= 0)
974 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id);
975 }
976 }
977 if (e->delete_me) break;
978 }
979 _evas_post_event_callback_call(e);
980
981 _evas_object_event_new();
982
983 event_id2 = _evas_event_counter;
984 if (copy) copy = eina_list_free(copy);
985 /* go thru our current list of ins */
986 EINA_LIST_FOREACH(newin, l, obj)
987 {
988 ev3.canvas.x = e->pointer.x;
989 ev3.canvas.y = e->pointer.y;
990 _evas_event_havemap_adjust(obj, &ev3.canvas.x, &ev3.canvas.y, obj->mouse_grabbed);
991 /* if its not in the old list of ins send an enter event */
992 if (!eina_list_data_find(e->pointer.object.in, obj))
993 {
994 if (!obj->mouse_in)
995 {
996 obj->mouse_in = 1;
997 if (e->events_frozen <= 0)
998 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2);
999 }
1000 }
1001 if (e->delete_me) break;
1002 }
1003 /* free our old list of ins */
1004 eina_list_free(e->pointer.object.in);
1005 /* and set up the new one */
1006 e->pointer.object.in = newin;
1007
1008 _evas_post_event_callback_call(e);
1009 }
769 _evas_unwalk(e); 1010 _evas_unwalk(e);
770} 1011}
771 1012
@@ -776,6 +1017,7 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data)
776 Eina_List *l; 1017 Eina_List *l;
777 Evas_Event_Mouse_In ev; 1018 Evas_Event_Mouse_In ev;
778 Evas_Object *obj; 1019 Evas_Object *obj;
1020 int event_id = 0;
779 1021
780 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 1022 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
781 return; 1023 return;
@@ -789,6 +1031,7 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data)
789 1031
790 _evas_object_event_new(); 1032 _evas_object_event_new();
791 1033
1034 event_id = _evas_event_counter;
792 ev.buttons = e->pointer.button; 1035 ev.buttons = e->pointer.button;
793 ev.output.x = e->pointer.x; 1036 ev.output.x = e->pointer.x;
794 ev.output.y = e->pointer.y; 1037 ev.output.y = e->pointer.y;
@@ -798,7 +1041,7 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data)
798 ev.modifiers = &(e->modifiers); 1041 ev.modifiers = &(e->modifiers);
799 ev.locks = &(e->locks); 1042 ev.locks = &(e->locks);
800 ev.timestamp = timestamp; 1043 ev.timestamp = timestamp;
801 ev.event_flags = EVAS_EVENT_FLAG_NONE; 1044 ev.event_flags = e->default_event_flags;
802 1045
803 _evas_walk(e); 1046 _evas_walk(e);
804 /* get new list of ins */ 1047 /* get new list of ins */
@@ -814,7 +1057,7 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data)
814 { 1057 {
815 obj->mouse_in = 1; 1058 obj->mouse_in = 1;
816 if (e->events_frozen <= 0) 1059 if (e->events_frozen <= 0)
817 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev); 1060 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev, event_id);
818 } 1061 }
819 } 1062 }
820 if (e->delete_me) break; 1063 if (e->delete_me) break;
@@ -832,6 +1075,7 @@ EAPI void
832evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) 1075evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data)
833{ 1076{
834 Evas_Event_Mouse_Out ev; 1077 Evas_Event_Mouse_Out ev;
1078 int event_id = 0;
835 1079
836 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 1080 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
837 return; 1081 return;
@@ -843,6 +1087,7 @@ evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data)
843 1087
844 _evas_object_event_new(); 1088 _evas_object_event_new();
845 1089
1090 event_id = _evas_event_counter;
846 ev.buttons = e->pointer.button; 1091 ev.buttons = e->pointer.button;
847 ev.output.x = e->pointer.x; 1092 ev.output.x = e->pointer.x;
848 ev.output.y = e->pointer.y; 1093 ev.output.y = e->pointer.y;
@@ -852,11 +1097,10 @@ evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data)
852 ev.modifiers = &(e->modifiers); 1097 ev.modifiers = &(e->modifiers);
853 ev.locks = &(e->locks); 1098 ev.locks = &(e->locks);
854 ev.timestamp = timestamp; 1099 ev.timestamp = timestamp;
855 ev.event_flags = EVAS_EVENT_FLAG_NONE; 1100 ev.event_flags = e->default_event_flags;
856 1101
857 _evas_walk(e); 1102 _evas_walk(e);
858 /* if our mouse button is grabbed to any objects */ 1103 /* if our mouse button is inside any objects */
859 if (e->pointer.mouse_grabbed == 0)
860 { 1104 {
861 /* go thru old list of in objects */ 1105 /* go thru old list of in objects */
862 Eina_List *l, *copy; 1106 Eina_List *l, *copy;
@@ -874,14 +1118,16 @@ evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data)
874 if (!obj->delete_me) 1118 if (!obj->delete_me)
875 { 1119 {
876 if (e->events_frozen <= 0) 1120 if (e->events_frozen <= 0)
877 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); 1121 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
878 } 1122 }
1123 obj->mouse_grabbed = 0;
879 } 1124 }
880 if (e->delete_me) break; 1125 if (e->delete_me) break;
881 } 1126 }
882 if (copy) copy = eina_list_free(copy); 1127 if (copy) copy = eina_list_free(copy);
883 /* free our old list of ins */ 1128 /* free our old list of ins */
884 e->pointer.object.in = eina_list_free(e->pointer.object.in); 1129 e->pointer.object.in = eina_list_free(e->pointer.object.in);
1130 e->pointer.mouse_grabbed = 0;
885 _evas_post_event_callback_call(e); 1131 _evas_post_event_callback_call(e);
886 } 1132 }
887 _evas_unwalk(e); 1133 _evas_unwalk(e);
@@ -899,16 +1145,20 @@ evas_event_feed_multi_down(Evas *e,
899 Eina_List *l, *copy; 1145 Eina_List *l, *copy;
900 Evas_Event_Multi_Down ev; 1146 Evas_Event_Multi_Down ev;
901 Evas_Object *obj; 1147 Evas_Object *obj;
1148 int addgrab = 0;
1149 int event_id = 0;
902 1150
903 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 1151 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
904 return; 1152 return;
905 MAGIC_CHECK_END(); 1153 MAGIC_CHECK_END();
906 1154
1155 e->pointer.downs++;
907 if (e->events_frozen > 0) return; 1156 if (e->events_frozen > 0) return;
908 e->last_timestamp = timestamp; 1157 e->last_timestamp = timestamp;
909 1158
910 _evas_object_event_new(); 1159 _evas_object_event_new();
911 1160
1161 event_id = _evas_event_counter;
912 ev.device = d; 1162 ev.device = d;
913 ev.output.x = x; 1163 ev.output.x = x;
914 ev.output.y = y; 1164 ev.output.y = y;
@@ -926,18 +1176,22 @@ evas_event_feed_multi_down(Evas *e,
926 ev.locks = &(e->locks); 1176 ev.locks = &(e->locks);
927 ev.flags = flags; 1177 ev.flags = flags;
928 ev.timestamp = timestamp; 1178 ev.timestamp = timestamp;
929 ev.event_flags = EVAS_EVENT_FLAG_NONE; 1179 ev.event_flags = e->default_event_flags;
930 1180
931 _evas_walk(e); 1181 _evas_walk(e);
932 /* append new touch point to the touch point list */ 1182 /* append new touch point to the touch point list */
933 _evas_touch_point_append(e, d, x, y); 1183 _evas_touch_point_append(e, d, x, y);
1184 if (e->pointer.mouse_grabbed == 0)
1185 {
1186 if (e->pointer.downs > 1) addgrab = e->pointer.downs - 1;
1187 }
934 copy = evas_event_list_copy(e->pointer.object.in); 1188 copy = evas_event_list_copy(e->pointer.object.in);
935 EINA_LIST_FOREACH(copy, l, obj) 1189 EINA_LIST_FOREACH(copy, l, obj)
936 { 1190 {
937 if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) 1191 if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB)
938 { 1192 {
939 obj->mouse_grabbed++; 1193 obj->mouse_grabbed += addgrab + 1;
940 e->pointer.mouse_grabbed++; 1194 e->pointer.mouse_grabbed += addgrab + 1;
941 } 1195 }
942 } 1196 }
943 EINA_LIST_FOREACH(copy, l, obj) 1197 EINA_LIST_FOREACH(copy, l, obj)
@@ -952,7 +1206,7 @@ evas_event_feed_multi_down(Evas *e,
952 if (y != ev.canvas.y) 1206 if (y != ev.canvas.y)
953 ev.canvas.ysub = ev.canvas.y; // fixme - lost precision 1207 ev.canvas.ysub = ev.canvas.y; // fixme - lost precision
954 if (e->events_frozen <= 0) 1208 if (e->events_frozen <= 0)
955 evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_DOWN, &ev); 1209 evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_DOWN, &ev, event_id);
956 if (e->delete_me) break; 1210 if (e->delete_me) break;
957 } 1211 }
958 if (copy) eina_list_free(copy); 1212 if (copy) eina_list_free(copy);
@@ -974,16 +1228,19 @@ evas_event_feed_multi_up(Evas *e,
974 Eina_List *l, *copy; 1228 Eina_List *l, *copy;
975 Evas_Event_Multi_Up ev; 1229 Evas_Event_Multi_Up ev;
976 Evas_Object *obj; 1230 Evas_Object *obj;
1231 int event_id = 0;
977 1232
978 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 1233 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
979 return; 1234 return;
980 MAGIC_CHECK_END(); 1235 MAGIC_CHECK_END();
981 1236
1237 e->pointer.downs--;
982 if (e->events_frozen > 0) return; 1238 if (e->events_frozen > 0) return;
983 e->last_timestamp = timestamp; 1239 e->last_timestamp = timestamp;
984 1240
985 _evas_object_event_new(); 1241 _evas_object_event_new();
986 1242
1243 event_id = _evas_event_counter;
987 ev.device = d; 1244 ev.device = d;
988 ev.output.x = x; 1245 ev.output.x = x;
989 ev.output.y = y; 1246 ev.output.y = y;
@@ -1001,7 +1258,7 @@ evas_event_feed_multi_up(Evas *e,
1001 ev.locks = &(e->locks); 1258 ev.locks = &(e->locks);
1002 ev.flags = flags; 1259 ev.flags = flags;
1003 ev.timestamp = timestamp; 1260 ev.timestamp = timestamp;
1004 ev.event_flags = EVAS_EVENT_FLAG_NONE; 1261 ev.event_flags = e->default_event_flags;
1005 1262
1006 _evas_walk(e); 1263 _evas_walk(e);
1007 /* update released touch point */ 1264 /* update released touch point */
@@ -1025,7 +1282,7 @@ evas_event_feed_multi_up(Evas *e,
1025 e->pointer.mouse_grabbed--; 1282 e->pointer.mouse_grabbed--;
1026 } 1283 }
1027 if (e->events_frozen <= 0) 1284 if (e->events_frozen <= 0)
1028 evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_UP, &ev); 1285 evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_UP, &ev, event_id);
1029 if (e->delete_me) break; 1286 if (e->delete_me) break;
1030 } 1287 }
1031 if (copy) copy = eina_list_free(copy); 1288 if (copy) copy = eina_list_free(copy);
@@ -1051,7 +1308,7 @@ evas_event_feed_multi_move(Evas *e,
1051 if (e->events_frozen > 0) return; 1308 if (e->events_frozen > 0) return;
1052 e->last_timestamp = timestamp; 1309 e->last_timestamp = timestamp;
1053 1310
1054 if (!e->pointer.inside) return; 1311 if ((!e->pointer.inside) && (e->pointer.mouse_grabbed == 0)) return;
1055 1312
1056 _evas_walk(e); 1313 _evas_walk(e);
1057 /* update moved touch point */ 1314 /* update moved touch point */
@@ -1063,9 +1320,11 @@ evas_event_feed_multi_move(Evas *e,
1063 Eina_List *l, *copy; 1320 Eina_List *l, *copy;
1064 Evas_Event_Multi_Move ev; 1321 Evas_Event_Multi_Move ev;
1065 Evas_Object *obj; 1322 Evas_Object *obj;
1323 int event_id = 0;
1066 1324
1067 _evas_object_event_new(); 1325 _evas_object_event_new();
1068 1326
1327 event_id = _evas_event_counter;
1069 ev.device = d; 1328 ev.device = d;
1070 ev.cur.output.x = x; 1329 ev.cur.output.x = x;
1071 ev.cur.output.y = y; 1330 ev.cur.output.y = y;
@@ -1082,7 +1341,7 @@ evas_event_feed_multi_move(Evas *e,
1082 ev.modifiers = &(e->modifiers); 1341 ev.modifiers = &(e->modifiers);
1083 ev.locks = &(e->locks); 1342 ev.locks = &(e->locks);
1084 ev.timestamp = timestamp; 1343 ev.timestamp = timestamp;
1085 ev.event_flags = EVAS_EVENT_FLAG_NONE; 1344 ev.event_flags = e->default_event_flags;
1086 1345
1087 copy = evas_event_list_copy(e->pointer.object.in); 1346 copy = evas_event_list_copy(e->pointer.object.in);
1088 EINA_LIST_FOREACH(copy, l, obj) 1347 EINA_LIST_FOREACH(copy, l, obj)
@@ -1102,7 +1361,7 @@ evas_event_feed_multi_move(Evas *e,
1102 ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision 1361 ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision
1103 if (y != ev.cur.canvas.y) 1362 if (y != ev.cur.canvas.y)
1104 ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision 1363 ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision
1105 evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev); 1364 evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id);
1106 } 1365 }
1107 if (e->delete_me) break; 1366 if (e->delete_me) break;
1108 } 1367 }
@@ -1114,9 +1373,11 @@ evas_event_feed_multi_move(Evas *e,
1114 Eina_List *l, *copy; 1373 Eina_List *l, *copy;
1115 Evas_Event_Multi_Move ev; 1374 Evas_Event_Multi_Move ev;
1116 Evas_Object *obj; 1375 Evas_Object *obj;
1376 int event_id = 0;
1117 1377
1118 _evas_object_event_new(); 1378 _evas_object_event_new();
1119 1379
1380 event_id = _evas_event_counter;
1120 ev.device = d; 1381 ev.device = d;
1121 ev.cur.output.x = x; 1382 ev.cur.output.x = x;
1122 ev.cur.output.y = y; 1383 ev.cur.output.y = y;
@@ -1133,7 +1394,7 @@ evas_event_feed_multi_move(Evas *e,
1133 ev.modifiers = &(e->modifiers); 1394 ev.modifiers = &(e->modifiers);
1134 ev.locks = &(e->locks); 1395 ev.locks = &(e->locks);
1135 ev.timestamp = timestamp; 1396 ev.timestamp = timestamp;
1136 ev.event_flags = EVAS_EVENT_FLAG_NONE; 1397 ev.event_flags = e->default_event_flags;
1137 1398
1138 /* get all new in objects */ 1399 /* get all new in objects */
1139 ins = evas_event_objects_event_list(e, NULL, x, y); 1400 ins = evas_event_objects_event_list(e, NULL, x, y);
@@ -1165,7 +1426,7 @@ evas_event_feed_multi_move(Evas *e,
1165 ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision 1426 ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision
1166 if (y != ev.cur.canvas.y) 1427 if (y != ev.cur.canvas.y)
1167 ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision 1428 ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision
1168 evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev); 1429 evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id);
1169 } 1430 }
1170 if (e->delete_me) break; 1431 if (e->delete_me) break;
1171 } 1432 }
@@ -1190,6 +1451,7 @@ evas_event_feed_multi_move(Evas *e,
1190EAPI void 1451EAPI void
1191evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) 1452evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data)
1192{ 1453{
1454 int event_id = 0;
1193 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 1455 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1194 return; 1456 return;
1195 MAGIC_CHECK_END(); 1457 MAGIC_CHECK_END();
@@ -1204,6 +1466,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch
1204 1466
1205 _evas_object_event_new(); 1467 _evas_object_event_new();
1206 1468
1469 event_id = _evas_event_counter;
1207 exclusive = EINA_FALSE; 1470 exclusive = EINA_FALSE;
1208 ev.keyname = (char *)keyname; 1471 ev.keyname = (char *)keyname;
1209 ev.data = (void *)data; 1472 ev.data = (void *)data;
@@ -1213,7 +1476,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch
1213 ev.string = string; 1476 ev.string = string;
1214 ev.compose = compose; 1477 ev.compose = compose;
1215 ev.timestamp = timestamp; 1478 ev.timestamp = timestamp;
1216 ev.event_flags = EVAS_EVENT_FLAG_NONE; 1479 ev.event_flags = e->default_event_flags;
1217 1480
1218 if (e->grabs) 1481 if (e->grabs)
1219 { 1482 {
@@ -1239,7 +1502,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch
1239 !evas_event_freezes_through(g->object)) 1502 !evas_event_freezes_through(g->object))
1240 evas_object_event_callback_call(g->object, 1503 evas_object_event_callback_call(g->object,
1241 EVAS_CALLBACK_KEY_DOWN, 1504 EVAS_CALLBACK_KEY_DOWN,
1242 &ev); 1505 &ev, event_id);
1243 if (g->exclusive) exclusive = EINA_TRUE; 1506 if (g->exclusive) exclusive = EINA_TRUE;
1244 } 1507 }
1245 } 1508 }
@@ -1266,7 +1529,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch
1266 { 1529 {
1267 if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused)) 1530 if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused))
1268 evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_DOWN, 1531 evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_DOWN,
1269 &ev); 1532 &ev, event_id);
1270 } 1533 }
1271 _evas_post_event_callback_call(e); 1534 _evas_post_event_callback_call(e);
1272 _evas_unwalk(e); 1535 _evas_unwalk(e);
@@ -1275,6 +1538,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch
1275EAPI void 1538EAPI void
1276evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) 1539evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data)
1277{ 1540{
1541 int event_id = 0;
1278 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 1542 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1279 return; 1543 return;
1280 MAGIC_CHECK_END(); 1544 MAGIC_CHECK_END();
@@ -1288,6 +1552,7 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char
1288 1552
1289 _evas_object_event_new(); 1553 _evas_object_event_new();
1290 1554
1555 event_id = _evas_event_counter;
1291 exclusive = EINA_FALSE; 1556 exclusive = EINA_FALSE;
1292 ev.keyname = (char *)keyname; 1557 ev.keyname = (char *)keyname;
1293 ev.data = (void *)data; 1558 ev.data = (void *)data;
@@ -1297,7 +1562,7 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char
1297 ev.string = string; 1562 ev.string = string;
1298 ev.compose = compose; 1563 ev.compose = compose;
1299 ev.timestamp = timestamp; 1564 ev.timestamp = timestamp;
1300 ev.event_flags = EVAS_EVENT_FLAG_NONE; 1565 ev.event_flags = e->default_event_flags;
1301 1566
1302 if (e->grabs) 1567 if (e->grabs)
1303 { 1568 {
@@ -1322,7 +1587,7 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char
1322 if (e->events_frozen <= 0 && 1587 if (e->events_frozen <= 0 &&
1323 !evas_event_freezes_through(g->object)) 1588 !evas_event_freezes_through(g->object))
1324 evas_object_event_callback_call(g->object, 1589 evas_object_event_callback_call(g->object,
1325 EVAS_CALLBACK_KEY_UP, &ev); 1590 EVAS_CALLBACK_KEY_UP, &ev, event_id);
1326 if (g->exclusive) exclusive = EINA_TRUE; 1591 if (g->exclusive) exclusive = EINA_TRUE;
1327 } 1592 }
1328 if (e->delete_me) break; 1593 if (e->delete_me) break;
@@ -1349,7 +1614,7 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char
1349 { 1614 {
1350 if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused)) 1615 if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused))
1351 evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_UP, 1616 evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_UP,
1352 &ev); 1617 &ev, event_id);
1353 } 1618 }
1354 _evas_post_event_callback_call(e); 1619 _evas_post_event_callback_call(e);
1355 _evas_unwalk(e); 1620 _evas_unwalk(e);
@@ -1361,6 +1626,7 @@ evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data
1361 Eina_List *l, *copy; 1626 Eina_List *l, *copy;
1362 Evas_Event_Hold ev; 1627 Evas_Event_Hold ev;
1363 Evas_Object *obj; 1628 Evas_Object *obj;
1629 int event_id = 0;
1364 1630
1365 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 1631 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1366 return; 1632 return;
@@ -1371,17 +1637,18 @@ evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data
1371 1637
1372 _evas_object_event_new(); 1638 _evas_object_event_new();
1373 1639
1640 event_id = _evas_event_counter;
1374 ev.hold = hold; 1641 ev.hold = hold;
1375 ev.data = (void *)data; 1642 ev.data = (void *)data;
1376 ev.timestamp = timestamp; 1643 ev.timestamp = timestamp;
1377 ev.event_flags = EVAS_EVENT_FLAG_NONE; 1644 ev.event_flags = e->default_event_flags;
1378 1645
1379 _evas_walk(e); 1646 _evas_walk(e);
1380 copy = evas_event_list_copy(e->pointer.object.in); 1647 copy = evas_event_list_copy(e->pointer.object.in);
1381 EINA_LIST_FOREACH(copy, l, obj) 1648 EINA_LIST_FOREACH(copy, l, obj)
1382 { 1649 {
1383 if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj)) 1650 if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj))
1384 evas_object_event_callback_call(obj, EVAS_CALLBACK_HOLD, &ev); 1651 evas_object_event_callback_call(obj, EVAS_CALLBACK_HOLD, &ev, event_id);
1385 if (e->delete_me) break; 1652 if (e->delete_me) break;
1386 } 1653 }
1387 if (copy) copy = eina_list_free(copy); 1654 if (copy) copy = eina_list_free(copy);
@@ -1528,75 +1795,84 @@ evas_object_pointer_mode_get(const Evas_Object *obj)
1528EAPI void 1795EAPI void
1529evas_event_refeed_event(Evas *e, void *event_copy, Evas_Callback_Type event_type) 1796evas_event_refeed_event(Evas *e, void *event_copy, Evas_Callback_Type event_type)
1530{ 1797{
1531 switch(event_type) 1798 switch (event_type)
1532 { 1799 {
1533 case EVAS_CALLBACK_MOUSE_IN: 1800 case EVAS_CALLBACK_MOUSE_IN:
1534 { 1801 {
1535 Evas_Event_Mouse_In *ev = event_copy; 1802 Evas_Event_Mouse_In *ev = event_copy;
1536 evas_event_feed_mouse_in(e, ev->timestamp, ev->data); 1803 evas_event_feed_mouse_in(e, ev->timestamp, ev->data);
1537 break; 1804 break;
1538 } 1805 }
1539 case EVAS_CALLBACK_MOUSE_OUT: 1806 case EVAS_CALLBACK_MOUSE_OUT:
1540 { 1807 {
1541 Evas_Event_Mouse_Out *ev = event_copy; 1808 Evas_Event_Mouse_Out *ev = event_copy;
1542 evas_event_feed_mouse_out(e, ev->timestamp, ev->data); 1809 evas_event_feed_mouse_out(e, ev->timestamp, ev->data);
1543 break; 1810 break;
1544 } 1811 }
1545 case EVAS_CALLBACK_MOUSE_DOWN: 1812 case EVAS_CALLBACK_MOUSE_DOWN:
1546 { 1813 {
1547 Evas_Event_Mouse_Down *ev = event_copy; 1814 Evas_Event_Mouse_Down *ev = event_copy;
1548 evas_event_feed_mouse_down(e, ev->button, ev->flags, ev-> timestamp, ev->data); 1815 evas_event_feed_mouse_down(e, ev->button, ev->flags, ev-> timestamp, ev->data);
1549 break; 1816 break;
1550 } 1817 }
1551 case EVAS_CALLBACK_MOUSE_UP: 1818 case EVAS_CALLBACK_MOUSE_UP:
1552 { 1819 {
1553 Evas_Event_Mouse_Up *ev = event_copy; 1820 Evas_Event_Mouse_Up *ev = event_copy;
1554 evas_event_feed_mouse_up(e, ev->button, ev->flags, ev-> timestamp, ev->data); 1821 evas_event_feed_mouse_up(e, ev->button, ev->flags, ev-> timestamp, ev->data);
1555 break; 1822 break;
1556 } 1823 }
1557 case EVAS_CALLBACK_MOUSE_MOVE: 1824 case EVAS_CALLBACK_MOUSE_MOVE:
1558 { 1825 {
1559 Evas_Event_Mouse_Move *ev = event_copy; 1826 Evas_Event_Mouse_Move *ev = event_copy;
1560 evas_event_feed_mouse_move(e, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp, ev->data); 1827 evas_event_feed_mouse_move(e, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp, ev->data);
1561 break; 1828 break;
1562 } 1829 }
1563 case EVAS_CALLBACK_MOUSE_WHEEL: 1830 case EVAS_CALLBACK_MOUSE_WHEEL:
1564 { 1831 {
1565 Evas_Event_Mouse_Wheel *ev = event_copy; 1832 Evas_Event_Mouse_Wheel *ev = event_copy;
1566 evas_event_feed_mouse_wheel(e, ev->direction, ev-> z, ev->timestamp, ev->data); 1833 evas_event_feed_mouse_wheel(e, ev->direction, ev-> z, ev->timestamp, ev->data);
1567 break; 1834 break;
1568 } 1835 }
1569 case EVAS_CALLBACK_MULTI_DOWN: 1836 case EVAS_CALLBACK_MULTI_DOWN:
1570 { 1837 {
1571 Evas_Event_Multi_Down *ev = event_copy; 1838 Evas_Event_Multi_Down *ev = event_copy;
1572 evas_event_feed_multi_down(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); 1839 evas_event_feed_multi_down(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data);
1573 break; 1840 break;
1574 } 1841 }
1575 case EVAS_CALLBACK_MULTI_UP: 1842 case EVAS_CALLBACK_MULTI_UP:
1576 { 1843 {
1577 Evas_Event_Multi_Up *ev = event_copy; 1844 Evas_Event_Multi_Up *ev = event_copy;
1578 evas_event_feed_multi_up(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); 1845 evas_event_feed_multi_up(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data);
1579 break; 1846 break;
1580 } 1847 }
1581 case EVAS_CALLBACK_MULTI_MOVE: 1848 case EVAS_CALLBACK_MULTI_MOVE:
1582 { 1849 {
1583 Evas_Event_Multi_Move *ev = event_copy; 1850 Evas_Event_Multi_Move *ev = event_copy;
1584 evas_event_feed_multi_move(e, ev->device, ev->cur.canvas.x, ev->cur.canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->cur.canvas.xsub, ev->cur.canvas.ysub, ev->timestamp, ev->data); 1851 evas_event_feed_multi_move(e, ev->device, ev->cur.canvas.x, ev->cur.canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->cur.canvas.xsub, ev->cur.canvas.ysub, ev->timestamp, ev->data);
1585 break; 1852 break;
1586 } 1853 }
1587 case EVAS_CALLBACK_KEY_DOWN: 1854 case EVAS_CALLBACK_KEY_DOWN:
1588 { 1855 {
1589 Evas_Event_Key_Down *ev = event_copy; 1856 Evas_Event_Key_Down *ev = event_copy;
1590 evas_event_feed_key_down(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); 1857 evas_event_feed_key_down(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data);
1591 break; 1858 break;
1592 } 1859 }
1593 case EVAS_CALLBACK_KEY_UP: 1860 case EVAS_CALLBACK_KEY_UP:
1594 { 1861 {
1595 Evas_Event_Key_Up *ev = event_copy; 1862 Evas_Event_Key_Up *ev = event_copy;
1596 evas_event_feed_key_up(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); 1863 evas_event_feed_key_up(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data);
1597 break; 1864 break;
1598 } 1865 }
1599 default: /* All non-input events are not handeled */ 1866 default: /* All non-input events are not handeled */
1600 break; 1867 break;
1601 } 1868 }
1602} 1869}
1870
1871EAPI int
1872evas_event_down_count_get(const Evas *e)
1873{
1874 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1875 return 0;
1876 MAGIC_CHECK_END();
1877 return e->pointer.downs;
1878}