2002-11-08 00:02:15 -08:00
|
|
|
#include "evas_common.h"
|
|
|
|
#include "evas_private.h"
|
|
|
|
|
2009-11-05 07:24:48 -08:00
|
|
|
static void
|
2010-09-17 23:31:41 -07:00
|
|
|
_evas_event_havemap_adjust(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Eina_Bool mouse_grabbed)
|
2009-11-05 07:24:48 -08:00
|
|
|
{
|
2010-09-17 23:31:41 -07:00
|
|
|
if (obj->smart.parent)
|
|
|
|
_evas_event_havemap_adjust(obj->smart.parent, x, y, mouse_grabbed);
|
2010-09-17 23:30:59 -07:00
|
|
|
|
2011-10-21 02:53:26 -07:00
|
|
|
if ((!obj->cur.usemap) || (!obj->cur.map) || (!obj->cur.map->count == 4))
|
2010-09-17 23:31:41 -07:00
|
|
|
return;
|
2010-09-17 23:31:12 -07:00
|
|
|
|
2011-10-21 02:53:26 -07:00
|
|
|
evas_map_coords_get(obj->cur.map, *x, *y, x, y, mouse_grabbed);
|
|
|
|
*x += obj->cur.geometry.x;
|
|
|
|
*y += obj->cur.geometry.y;
|
2009-11-05 07:24:48 -08:00
|
|
|
}
|
|
|
|
|
2008-10-21 09:31:05 -07:00
|
|
|
static Eina_List *
|
2009-11-05 07:24:48 -08:00
|
|
|
_evas_event_object_list_in_get(Evas *e, Eina_List *in,
|
2010-09-17 23:31:05 -07:00
|
|
|
const Eina_Inlist *list, Evas_Object *stop,
|
|
|
|
int x, int y, int *no_rep)
|
2005-10-26 19:44:36 -07:00
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
Evas_Object *obj;
|
2005-10-26 19:44:36 -07:00
|
|
|
if (!list) return in;
|
2008-10-21 05:19:57 -07:00
|
|
|
EINA_INLIST_REVERSE_FOREACH(list, obj)
|
2005-10-26 19:44:36 -07:00
|
|
|
{
|
2011-09-21 03:35:03 -07:00
|
|
|
if (obj == stop)
|
|
|
|
{
|
|
|
|
*no_rep = 1;
|
|
|
|
return in;
|
|
|
|
}
|
|
|
|
if (evas_event_passes_through(obj)) continue;
|
2009-11-05 07:24:48 -08:00
|
|
|
if ((obj->cur.visible) && (obj->delete_me == 0) &&
|
|
|
|
(!obj->clip.clipees) &&
|
|
|
|
(evas_object_clippers_is_visible(obj)))
|
|
|
|
{
|
|
|
|
if (obj->smart.smart)
|
|
|
|
{
|
2011-10-20 05:21:41 -07:00
|
|
|
int norep = 0;
|
2009-11-05 07:24:48 -08:00
|
|
|
int inside;
|
2010-09-17 23:31:12 -07:00
|
|
|
|
2011-10-20 05:21:41 -07:00
|
|
|
if (((obj->cur.usemap) && (obj->cur.map) && (obj->cur.map->count == 4)))
|
2009-11-05 07:24:48 -08:00
|
|
|
{
|
|
|
|
inside = evas_object_is_in_output_rect(obj, x, y, 1, 1);
|
|
|
|
if (inside)
|
|
|
|
{
|
|
|
|
if (!evas_map_coords_get(obj->cur.map, x, y,
|
|
|
|
&(obj->cur.map->mx),
|
|
|
|
&(obj->cur.map->my), 0))
|
2010-09-17 23:30:30 -07:00
|
|
|
{
|
|
|
|
inside = 0;
|
|
|
|
}
|
2009-11-05 07:24:48 -08:00
|
|
|
else
|
2010-09-17 23:30:30 -07:00
|
|
|
{
|
|
|
|
in = _evas_event_object_list_in_get
|
|
|
|
(e, in,
|
|
|
|
evas_object_smart_members_get_direct(obj),
|
|
|
|
stop,
|
|
|
|
obj->cur.geometry.x + obj->cur.map->mx,
|
2010-09-17 23:31:05 -07:00
|
|
|
obj->cur.geometry.y + obj->cur.map->my, &norep);
|
2010-09-17 23:30:30 -07:00
|
|
|
}
|
2009-11-05 07:24:48 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
in = _evas_event_object_list_in_get
|
2010-09-17 23:30:45 -07:00
|
|
|
(e, in, evas_object_smart_members_get_direct(obj),
|
2010-09-17 23:31:05 -07:00
|
|
|
stop, x, y, &norep);
|
2009-11-05 07:24:48 -08:00
|
|
|
}
|
|
|
|
if (norep)
|
|
|
|
{
|
2011-11-24 05:01:15 -08:00
|
|
|
if (!obj->repeat_events) *no_rep = 1;
|
2009-11-05 07:24:48 -08:00
|
|
|
return in;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-10-20 05:21:41 -07:00
|
|
|
int inside = evas_object_is_in_output_rect(obj, x, y, 1, 1);
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2011-10-20 05:21:41 -07:00
|
|
|
if (((obj->cur.usemap) && (obj->cur.map) && (obj->cur.map->count == 4)))
|
2009-11-05 07:24:48 -08:00
|
|
|
{
|
2010-09-17 23:30:37 -07:00
|
|
|
if ((inside) && (!evas_map_coords_get(obj->cur.map, x, y,
|
|
|
|
&(obj->cur.map->mx),
|
|
|
|
&(obj->cur.map->my), 0)))
|
2009-11-05 07:24:48 -08:00
|
|
|
{
|
2010-09-17 23:30:37 -07:00
|
|
|
inside = 0;
|
2009-11-05 07:24:48 -08:00
|
|
|
}
|
|
|
|
}
|
2010-09-17 23:30:37 -07:00
|
|
|
|
2009-11-05 07:24:48 -08:00
|
|
|
if (inside && ((!obj->precise_is_inside) ||
|
|
|
|
(evas_object_is_inside(obj, x, y))))
|
|
|
|
{
|
2011-10-27 03:36:09 -07:00
|
|
|
if (!evas_event_freezes_through(obj))
|
|
|
|
in = eina_list_append(in, obj);
|
2009-11-05 07:24:48 -08:00
|
|
|
if (!obj->repeat_events)
|
|
|
|
{
|
|
|
|
*no_rep = 1;
|
|
|
|
return in;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
2005-10-26 19:44:36 -07:00
|
|
|
}
|
|
|
|
*no_rep = 0;
|
|
|
|
return in;
|
|
|
|
}
|
|
|
|
|
2008-10-21 09:31:05 -07:00
|
|
|
Eina_List *
|
2002-11-08 00:02:15 -08:00
|
|
|
evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y)
|
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
Evas_Layer *lay;
|
2008-10-21 09:31:05 -07:00
|
|
|
Eina_List *in = NULL;
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2011-11-15 07:10:19 -08:00
|
|
|
if ((!e->layers) || (e->events_frozen > 0)) return NULL;
|
2008-10-21 05:19:57 -07:00
|
|
|
EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2011-10-10 01:52:08 -07:00
|
|
|
int norep = 0;
|
2011-09-21 03:35:03 -07:00
|
|
|
in = _evas_event_object_list_in_get(e, in,
|
|
|
|
EINA_INLIST_GET(lay->objects),
|
2010-09-17 23:31:05 -07:00
|
|
|
stop, x, y, &norep);
|
2011-09-21 03:35:03 -07:00
|
|
|
if (norep) return in;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
return in;
|
|
|
|
}
|
|
|
|
|
2008-10-21 09:31:05 -07:00
|
|
|
static Eina_List *
|
|
|
|
evas_event_list_copy(Eina_List *list)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2008-10-21 09:31:05 -07:00
|
|
|
Eina_List *l, *new_l = NULL;
|
|
|
|
const void *data;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2008-10-21 09:31:05 -07:00
|
|
|
EINA_LIST_FOREACH(list, l, data)
|
|
|
|
new_l = eina_list_append(new_l, data);
|
2002-11-08 00:02:15 -08:00
|
|
|
return new_l;
|
|
|
|
}
|
|
|
|
/* public functions */
|
|
|
|
|
2011-12-16 01:24:18 -08:00
|
|
|
EAPI void
|
|
|
|
evas_event_default_flags_set(Evas *e, Evas_Event_Flags flags)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
e->default_event_flags = flags;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Event_Flags
|
|
|
|
evas_event_default_flags_get(const Evas *e)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return EVAS_EVENT_FLAG_ON_HOLD;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
return e->default_event_flags;
|
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2002-11-08 00:02:15 -08:00
|
|
|
evas_event_freeze(Evas *e)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
e->events_frozen++;
|
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2002-11-08 00:02:15 -08:00
|
|
|
evas_event_thaw(Evas *e)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
e->events_frozen--;
|
2005-07-22 03:28:11 -07:00
|
|
|
if (e->events_frozen == 0)
|
|
|
|
{
|
2011-09-21 03:35:03 -07:00
|
|
|
Evas_Layer *lay;
|
|
|
|
|
|
|
|
EINA_INLIST_FOREACH((EINA_INLIST_GET(e->layers)), lay)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
|
|
|
|
|
|
|
EINA_INLIST_FOREACH(lay->objects, obj)
|
|
|
|
{
|
|
|
|
evas_object_clip_recalc(obj);
|
|
|
|
evas_object_recalc_clippees(obj);
|
|
|
|
}
|
|
|
|
}
|
2005-07-22 03:28:11 -07:00
|
|
|
}
|
2004-01-27 18:43:13 -08:00
|
|
|
if (e->events_frozen < 0)
|
|
|
|
evas_debug_generic(" Thaw of events when already thawed!!!\n");
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI int
|
2008-02-08 14:35:19 -08:00
|
|
|
evas_event_freeze_get(const Evas *e)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return 0;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
return e->events_frozen;
|
|
|
|
}
|
|
|
|
|
2011-05-27 01:26:11 -07:00
|
|
|
EAPI void
|
|
|
|
evas_event_thaw_eval(Evas *e)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
if (e->events_frozen != 0) return;
|
2011-07-07 06:59:50 -07:00
|
|
|
|
2011-09-21 03:35:03 -07:00
|
|
|
evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y,
|
2011-05-27 01:26:11 -07:00
|
|
|
e->last_timestamp, NULL);
|
|
|
|
}
|
2009-09-17 15:38:10 -07:00
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2005-07-25 02:55:47 -07:00
|
|
|
evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2008-10-21 09:31:05 -07:00
|
|
|
Eina_List *l, *copy;
|
2008-01-23 01:00:59 -08:00
|
|
|
Evas_Event_Mouse_Down ev;
|
2008-10-21 09:31:05 -07:00
|
|
|
Evas_Object *obj;
|
2011-12-12 21:59:36 -08:00
|
|
|
int addgrab = 0;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2011-12-14 21:25:37 -08:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
|
|
|
|
if ((b < 1) || (b > 32)) return;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
e->pointer.button |= (1 << (b - 1));
|
2011-12-12 21:59:36 -08:00
|
|
|
e->pointer.downs++;
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
if (e->events_frozen > 0) return;
|
2005-07-25 02:55:47 -07:00
|
|
|
e->last_timestamp = timestamp;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2010-03-04 06:48:21 -08:00
|
|
|
_evas_object_event_new();
|
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2008-01-23 01:00:59 -08:00
|
|
|
ev.button = b;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.flags = flags;
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2008-07-18 04:04:06 -07:00
|
|
|
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_walk(e);
|
From: EunMi Lee <eunmi15.lee@samsung.com>
Subject: [E-devel] [Patch] [Evas] Patch to provide information of
touched points
Hello,
I made a new patch to get information of current touched point instead
of Touch Event.
I added touch_points (Eina_List) to the Evas structure and it maintains touched points on the evas.
New touched point is added to the touch_points when we get Mouse_Down and Multi_Down,
touched point is updated when we get Mouse_Move and Mult_Move,
and touched point is removed when we get Mouse_Up and Multi_Up.
The each touch point has coordinate, id and state information as follows:
id - identifier. 0 for Mouse Event and device id for Multi Event. coordinate - (x, y) coordinate of point.
state - state of point. type is Evas_Touch_Point_State enum.
(EVAS_TOUCH_POINT_DOWN, EVAS_TOUCH_POINT_UP, EVAS_TOUCH_POINT_MOVE,
EVAS_TOUCH_POINT_STILL, EVAS_TOUCH_POINT_CANCEL)
There are 4 new APIs to get touch point's information as follows:
unsigned int evas_touch_point_list_count(Evas *e);
void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y);
int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n);
Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n);
I added APIs to get each information instead of exposing whole
structure to make it easy to expand in the future as you mentioned in
the below e-mail :)
SVN revision: 64373
2011-10-24 22:03:50 -07:00
|
|
|
/* append new touch point to the touch point list */
|
|
|
|
_evas_touch_point_append(e, 0, e->pointer.x, e->pointer.y);
|
2011-06-28 22:05:32 -07:00
|
|
|
/* If this is the first finger down, i.e no other fingers pressed,
|
|
|
|
* get a new event list, otherwise, keep the current grabbed list. */
|
|
|
|
if (e->pointer.mouse_grabbed == 0)
|
|
|
|
{
|
2011-10-27 03:36:09 -07:00
|
|
|
Eina_List *ins = evas_event_objects_event_list(e,
|
|
|
|
NULL,
|
|
|
|
e->pointer.x,
|
|
|
|
e->pointer.y);
|
2011-06-28 22:05:32 -07:00
|
|
|
/* free our old list of ins */
|
|
|
|
e->pointer.object.in = eina_list_free(e->pointer.object.in);
|
|
|
|
/* and set up the new one */
|
|
|
|
e->pointer.object.in = ins;
|
2011-12-12 21:59:36 -08:00
|
|
|
/* adjust grabbed count by the nuymber of currently held down
|
|
|
|
* fingers/buttons */
|
|
|
|
if (e->pointer.downs > 1) addgrab = e->pointer.downs - 1;
|
2011-06-28 22:05:32 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
2008-10-21 09:31:05 -07:00
|
|
|
EINA_LIST_FOREACH(copy, l, obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2011-09-23 21:01:36 -07:00
|
|
|
if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB)
|
2011-09-21 03:35:03 -07:00
|
|
|
{
|
2011-12-12 21:59:36 -08:00
|
|
|
obj->mouse_grabbed += addgrab + 1;
|
|
|
|
e->pointer.mouse_grabbed += addgrab + 1;
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
2011-09-25 19:45:06 -07:00
|
|
|
}
|
|
|
|
EINA_LIST_FOREACH(copy, l, obj)
|
|
|
|
{
|
|
|
|
if (obj->delete_me) continue;
|
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
_evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
|
2011-09-23 21:01:36 -07:00
|
|
|
|
|
|
|
if (e->events_frozen <= 0)
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev, event_id);
|
2011-09-21 03:35:03 -07:00
|
|
|
if (e->delete_me) break;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2009-06-12 17:04:25 -07:00
|
|
|
if (copy) eina_list_free(copy);
|
2006-08-25 13:47:32 -07:00
|
|
|
e->last_mouse_down_counter++;
|
2010-05-04 08:58:10 -07:00
|
|
|
_evas_post_event_callback_call(e);
|
From: EunMi Lee <eunmi15.lee@samsung.com>
Subject: [E-devel] [Patch] [Evas] Patch to provide information of
touched points
Hello,
I made a new patch to get information of current touched point instead
of Touch Event.
I added touch_points (Eina_List) to the Evas structure and it maintains touched points on the evas.
New touched point is added to the touch_points when we get Mouse_Down and Multi_Down,
touched point is updated when we get Mouse_Move and Mult_Move,
and touched point is removed when we get Mouse_Up and Multi_Up.
The each touch point has coordinate, id and state information as follows:
id - identifier. 0 for Mouse Event and device id for Multi Event. coordinate - (x, y) coordinate of point.
state - state of point. type is Evas_Touch_Point_State enum.
(EVAS_TOUCH_POINT_DOWN, EVAS_TOUCH_POINT_UP, EVAS_TOUCH_POINT_MOVE,
EVAS_TOUCH_POINT_STILL, EVAS_TOUCH_POINT_CANCEL)
There are 4 new APIs to get touch point's information as follows:
unsigned int evas_touch_point_list_count(Evas *e);
void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y);
int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n);
Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n);
I added APIs to get each information instead of exposing whole
structure to make it easy to expand in the future as you mentioned in
the below e-mail :)
SVN revision: 64373
2011-10-24 22:03:50 -07:00
|
|
|
/* update touch point's state to EVAS_TOUCH_POINT_STILL */
|
|
|
|
_evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_STILL);
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_unwalk(e);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2011-06-13 03:00:25 -07:00
|
|
|
static int
|
|
|
|
_post_up_handle(Evas *e, unsigned int timestamp, const void *data)
|
|
|
|
{
|
|
|
|
Eina_List *l, *copy, *ins, *ll;
|
|
|
|
Evas_Event_Mouse_Out ev;
|
|
|
|
Evas_Object *obj;
|
|
|
|
int post_called = 0;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2011-06-13 03:00:25 -07:00
|
|
|
_evas_object_event_new();
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2011-06-13 03:00:25 -07:00
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2011-06-13 03:00:25 -07:00
|
|
|
/* get new list of ins */
|
|
|
|
ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y);
|
|
|
|
/* go thru old list of in objects */
|
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
|
|
|
EINA_LIST_FOREACH(copy, ll, obj)
|
|
|
|
{
|
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
_evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
|
|
|
|
if ((!eina_list_data_find(ins, obj)) ||
|
|
|
|
(!e->pointer.inside))
|
|
|
|
{
|
|
|
|
if (obj->mouse_in)
|
|
|
|
{
|
|
|
|
obj->mouse_in = 0;
|
|
|
|
if (e->events_frozen <= 0)
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
|
2011-06-13 03:00:25 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (e->delete_me) break;
|
|
|
|
}
|
|
|
|
_evas_post_event_callback_call(e);
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2011-06-13 03:00:25 -07:00
|
|
|
if (copy) copy = eina_list_free(copy);
|
|
|
|
if (e->pointer.inside)
|
|
|
|
{
|
2011-06-14 07:04:07 -07:00
|
|
|
Evas_Event_Mouse_In ev_in;
|
|
|
|
Evas_Object *obj_itr;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2011-06-13 03:00:25 -07:00
|
|
|
_evas_object_event_new();
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2011-06-14 07:04:07 -07:00
|
|
|
ev_in.buttons = e->pointer.button;
|
|
|
|
ev_in.output.x = e->pointer.x;
|
|
|
|
ev_in.output.y = e->pointer.y;
|
|
|
|
ev_in.canvas.x = e->pointer.x;
|
|
|
|
ev_in.canvas.y = e->pointer.y;
|
|
|
|
ev_in.data = (void *)data;
|
|
|
|
ev_in.modifiers = &(e->modifiers);
|
|
|
|
ev_in.locks = &(e->locks);
|
|
|
|
ev_in.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev_in.event_flags = e->default_event_flags;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2011-06-14 07:04:07 -07:00
|
|
|
EINA_LIST_FOREACH(ins, l, obj_itr)
|
2011-06-13 03:00:25 -07:00
|
|
|
{
|
2011-06-14 07:04:07 -07:00
|
|
|
ev_in.canvas.x = e->pointer.x;
|
|
|
|
ev_in.canvas.y = e->pointer.y;
|
|
|
|
_evas_event_havemap_adjust(obj_itr, &ev_in.canvas.x, &ev_in.canvas.y, obj_itr->mouse_grabbed);
|
|
|
|
if (!eina_list_data_find(e->pointer.object.in, obj_itr))
|
2011-06-13 03:00:25 -07:00
|
|
|
{
|
2011-06-14 07:04:07 -07:00
|
|
|
if (!obj_itr->mouse_in)
|
2011-06-13 03:00:25 -07:00
|
|
|
{
|
2011-06-14 07:04:07 -07:00
|
|
|
obj_itr->mouse_in = 1;
|
2011-06-13 03:00:25 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj_itr, EVAS_CALLBACK_MOUSE_IN, &ev_in, event_id);
|
2011-06-13 03:00:25 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (e->delete_me) break;
|
|
|
|
}
|
|
|
|
post_called = 1;
|
|
|
|
_evas_post_event_callback_call(e);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ins = eina_list_free(ins);
|
|
|
|
}
|
2011-06-28 22:05:35 -07:00
|
|
|
|
|
|
|
if (e->pointer.mouse_grabbed == 0)
|
|
|
|
{
|
|
|
|
/* free our old list of ins */
|
|
|
|
eina_list_free(e->pointer.object.in);
|
|
|
|
/* and set up the new one */
|
|
|
|
e->pointer.object.in = ins;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* free our cur ins */
|
|
|
|
eina_list_free(ins);
|
|
|
|
}
|
2011-06-13 03:00:25 -07:00
|
|
|
if (e->pointer.inside)
|
|
|
|
evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, timestamp, data);
|
|
|
|
return post_called;
|
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2005-07-25 02:55:47 -07:00
|
|
|
evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2008-10-21 09:31:05 -07:00
|
|
|
Eina_List *l, *copy;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
if ((b < 1) || (b > 32)) return;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
e->pointer.button &= ~(1 << (b - 1));
|
2011-12-12 21:59:36 -08:00
|
|
|
e->pointer.downs--;
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
if (e->events_frozen > 0) return;
|
2005-07-25 02:55:47 -07:00
|
|
|
e->last_timestamp = timestamp;
|
2008-07-18 04:04:06 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2011-09-21 03:35:03 -07:00
|
|
|
Evas_Event_Mouse_Up ev;
|
|
|
|
Evas_Object *obj;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
|
|
|
_evas_object_event_new();
|
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2011-09-21 03:35:03 -07:00
|
|
|
ev.button = b;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.flags = flags;
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
|
|
|
_evas_walk(e);
|
From: EunMi Lee <eunmi15.lee@samsung.com>
Subject: [E-devel] [Patch] [Evas] Patch to provide information of
touched points
Hello,
I made a new patch to get information of current touched point instead
of Touch Event.
I added touch_points (Eina_List) to the Evas structure and it maintains touched points on the evas.
New touched point is added to the touch_points when we get Mouse_Down and Multi_Down,
touched point is updated when we get Mouse_Move and Mult_Move,
and touched point is removed when we get Mouse_Up and Multi_Up.
The each touch point has coordinate, id and state information as follows:
id - identifier. 0 for Mouse Event and device id for Multi Event. coordinate - (x, y) coordinate of point.
state - state of point. type is Evas_Touch_Point_State enum.
(EVAS_TOUCH_POINT_DOWN, EVAS_TOUCH_POINT_UP, EVAS_TOUCH_POINT_MOVE,
EVAS_TOUCH_POINT_STILL, EVAS_TOUCH_POINT_CANCEL)
There are 4 new APIs to get touch point's information as follows:
unsigned int evas_touch_point_list_count(Evas *e);
void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y);
int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n);
Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n);
I added APIs to get each information instead of exposing whole
structure to make it easy to expand in the future as you mentioned in
the below e-mail :)
SVN revision: 64373
2011-10-24 22:03:50 -07:00
|
|
|
/* update released touch point */
|
|
|
|
_evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_UP);
|
2011-09-21 03:35:03 -07:00
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
|
|
|
EINA_LIST_FOREACH(copy, l, obj)
|
|
|
|
{
|
2011-09-23 21:01:36 -07:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
_evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
|
|
|
|
if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) &&
|
|
|
|
(obj->mouse_grabbed > 0))
|
|
|
|
{
|
|
|
|
obj->mouse_grabbed--;
|
|
|
|
e->pointer.mouse_grabbed--;
|
|
|
|
}
|
|
|
|
if (!obj->delete_me)
|
2010-08-23 19:53:33 -07:00
|
|
|
{
|
|
|
|
if (e->events_frozen <= 0)
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev, event_id);
|
2010-08-23 19:53:33 -07:00
|
|
|
}
|
2011-09-21 03:35:03 -07:00
|
|
|
if (e->delete_me) break;
|
|
|
|
}
|
|
|
|
if (copy) copy = eina_list_free(copy);
|
|
|
|
e->last_mouse_up_counter++;
|
2010-05-04 08:58:10 -07:00
|
|
|
_evas_post_event_callback_call(e);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2008-07-18 04:04:06 -07:00
|
|
|
|
2011-06-23 23:59:30 -07:00
|
|
|
if (e->pointer.mouse_grabbed == 0)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2011-06-13 03:00:25 -07:00
|
|
|
_post_up_handle(e, timestamp, data);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2007-07-24 07:20:07 -07:00
|
|
|
|
|
|
|
if (e->pointer.mouse_grabbed < 0)
|
2008-11-14 21:13:09 -08:00
|
|
|
{
|
2009-10-22 08:22:22 -07:00
|
|
|
ERR("BUG? e->pointer.mouse_grabbed (=%d) < 0!",
|
2011-09-21 03:35:03 -07:00
|
|
|
e->pointer.mouse_grabbed);
|
2008-11-14 21:13:09 -08:00
|
|
|
}
|
2011-11-09 22:25:56 -08:00
|
|
|
/* remove released touch point from the touch point list */
|
|
|
|
_evas_touch_point_remove(e, 0);
|
2011-12-14 21:25:37 -08:00
|
|
|
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_unwalk(e);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2008-05-18 21:15:22 -07:00
|
|
|
EAPI void
|
|
|
|
evas_event_feed_mouse_cancel(Evas *e, unsigned int timestamp, const void *data)
|
|
|
|
{
|
|
|
|
int i;
|
2008-07-18 04:04:06 -07:00
|
|
|
|
2008-05-18 21:15:22 -07:00
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
|
|
|
|
if (e->events_frozen > 0) return;
|
2008-07-18 04:04:06 -07:00
|
|
|
|
2008-05-18 21:15:22 -07:00
|
|
|
_evas_walk(e);
|
|
|
|
for (i = 0; i < 32; i++)
|
|
|
|
{
|
2011-09-21 03:35:03 -07:00
|
|
|
if ((e->pointer.button & (1 << i)))
|
|
|
|
evas_event_feed_mouse_up(e, i + 1, 0, timestamp, data);
|
2008-05-18 21:15:22 -07:00
|
|
|
}
|
|
|
|
_evas_unwalk(e);
|
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2005-07-25 02:55:47 -07:00
|
|
|
evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestamp, const void *data)
|
2004-12-13 19:21:32 -08:00
|
|
|
{
|
2008-10-21 09:31:05 -07:00
|
|
|
Eina_List *l, *copy;
|
2008-01-23 01:00:59 -08:00
|
|
|
Evas_Event_Mouse_Wheel ev;
|
2008-10-21 09:31:05 -07:00
|
|
|
Evas_Object *obj;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2004-12-13 19:21:32 -08:00
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
|
|
|
|
if (e->events_frozen > 0) return;
|
2005-07-25 02:55:47 -07:00
|
|
|
e->last_timestamp = timestamp;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2010-03-04 06:48:21 -08:00
|
|
|
_evas_object_event_new();
|
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2008-01-23 01:00:59 -08:00
|
|
|
ev.direction = direction;
|
|
|
|
ev.z = z;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
ev.data = (void *) data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2008-07-18 04:04:06 -07:00
|
|
|
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_walk(e);
|
2004-12-13 19:21:32 -08:00
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
2008-07-18 04:04:06 -07:00
|
|
|
|
2008-10-21 09:31:05 -07:00
|
|
|
EINA_LIST_FOREACH(copy, l, obj)
|
2005-09-21 19:52:53 -07:00
|
|
|
{
|
2011-09-23 21:01:36 -07:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
_evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
|
2011-11-11 23:51:58 -08:00
|
|
|
if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj))
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev, event_id);
|
2011-09-21 03:35:03 -07:00
|
|
|
if (e->delete_me) break;
|
2005-09-21 19:52:53 -07:00
|
|
|
}
|
2008-10-21 09:31:05 -07:00
|
|
|
if (copy) copy = eina_list_free(copy);
|
2010-05-04 08:58:10 -07:00
|
|
|
_evas_post_event_callback_call(e);
|
2004-12-13 19:21:32 -08:00
|
|
|
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_unwalk(e);
|
2004-12-13 19:21:32 -08:00
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2005-07-25 02:55:47 -07:00
|
|
|
evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const void *data)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
|
|
|
int px, py;
|
2006-11-15 19:20:24 -08:00
|
|
|
//// Evas_Coord pcx, pcy;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
px = e->pointer.x;
|
|
|
|
py = e->pointer.y;
|
2006-11-15 19:20:24 -08:00
|
|
|
//// pcx = e->pointer.canvas_x;
|
|
|
|
//// pcy = e->pointer.canvas_y;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
if (e->events_frozen > 0) return;
|
2005-07-25 02:55:47 -07:00
|
|
|
e->last_timestamp = timestamp;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
e->pointer.x = x;
|
|
|
|
e->pointer.y = y;
|
2006-11-15 19:20:24 -08:00
|
|
|
//// e->pointer.canvas_x = x;
|
|
|
|
//// e->pointer.canvas_y = y;
|
|
|
|
//// e->pointer.canvas_x = evas_coord_screen_x_to_world(e, x);
|
|
|
|
//// e->pointer.canvas_y = evas_coord_screen_y_to_world(e, y);
|
2004-09-17 06:46:55 -07:00
|
|
|
if ((!e->pointer.inside) && (e->pointer.mouse_grabbed == 0)) return;
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_walk(e);
|
From: EunMi Lee <eunmi15.lee@samsung.com>
Subject: [E-devel] [Patch] [Evas] Patch to provide information of
touched points
Hello,
I made a new patch to get information of current touched point instead
of Touch Event.
I added touch_points (Eina_List) to the Evas structure and it maintains touched points on the evas.
New touched point is added to the touch_points when we get Mouse_Down and Multi_Down,
touched point is updated when we get Mouse_Move and Mult_Move,
and touched point is removed when we get Mouse_Up and Multi_Up.
The each touch point has coordinate, id and state information as follows:
id - identifier. 0 for Mouse Event and device id for Multi Event. coordinate - (x, y) coordinate of point.
state - state of point. type is Evas_Touch_Point_State enum.
(EVAS_TOUCH_POINT_DOWN, EVAS_TOUCH_POINT_UP, EVAS_TOUCH_POINT_MOVE,
EVAS_TOUCH_POINT_STILL, EVAS_TOUCH_POINT_CANCEL)
There are 4 new APIs to get touch point's information as follows:
unsigned int evas_touch_point_list_count(Evas *e);
void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y);
int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n);
Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n);
I added APIs to get each information instead of exposing whole
structure to make it easy to expand in the future as you mentioned in
the below e-mail :)
SVN revision: 64373
2011-10-24 22:03:50 -07:00
|
|
|
/* update moved touch point */
|
|
|
|
if ((px != x) || (py != y))
|
|
|
|
_evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_MOVE);
|
2005-05-21 19:49:50 -07:00
|
|
|
/* if our mouse button is grabbed to any objects */
|
2006-04-19 07:37:49 -07:00
|
|
|
if (e->pointer.mouse_grabbed > 0)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2011-09-21 03:35:03 -07:00
|
|
|
/* go thru old list of in objects */
|
|
|
|
Eina_List *outs = NULL;
|
|
|
|
Eina_List *l, *copy;
|
|
|
|
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Move ev;
|
|
|
|
Evas_Object *obj;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
|
|
|
_evas_object_event_new();
|
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2011-09-21 03:35:03 -07:00
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.cur.output.x = e->pointer.x;
|
|
|
|
ev.cur.output.y = e->pointer.y;
|
|
|
|
ev.cur.canvas.x = e->pointer.x;
|
|
|
|
ev.cur.canvas.y = e->pointer.y;
|
|
|
|
ev.prev.output.x = px;
|
|
|
|
ev.prev.output.y = py;
|
|
|
|
ev.prev.canvas.x = px;
|
|
|
|
ev.prev.canvas.y = py;
|
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2011-09-21 03:35:03 -07:00
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
|
|
|
EINA_LIST_FOREACH(copy, l, obj)
|
|
|
|
{
|
2011-09-23 21:01:36 -07:00
|
|
|
ev.cur.canvas.x = e->pointer.x;
|
|
|
|
ev.cur.canvas.y = e->pointer.y;
|
2011-11-15 07:10:19 -08:00
|
|
|
_evas_event_havemap_adjust(obj, &ev.cur.canvas.x,
|
|
|
|
&ev.cur.canvas.y,
|
|
|
|
obj->mouse_grabbed);
|
|
|
|
if ((e->events_frozen <= 0) &&
|
|
|
|
(evas_object_clippers_is_visible(obj) ||
|
|
|
|
obj->mouse_grabbed) &&
|
2011-09-23 21:01:36 -07:00
|
|
|
(!evas_event_passes_through(obj)) &&
|
2011-10-31 07:50:00 -07:00
|
|
|
(!evas_event_freezes_through(obj)) &&
|
2011-09-23 21:01:36 -07:00
|
|
|
(!obj->clip.clipees))
|
2011-09-21 03:35:03 -07:00
|
|
|
{
|
|
|
|
if ((px != x) || (py != y))
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id);
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
outs = eina_list_append(outs, obj);
|
|
|
|
if (e->delete_me) break;
|
|
|
|
}
|
2010-05-04 08:58:10 -07:00
|
|
|
_evas_post_event_callback_call(e);
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Out ev;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
|
|
|
_evas_object_event_new();
|
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2011-09-21 03:35:03 -07:00
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
|
|
|
if (copy) eina_list_free(copy);
|
|
|
|
while (outs)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
|
|
|
|
|
|
|
obj = outs->data;
|
|
|
|
outs = eina_list_remove(outs, obj);
|
|
|
|
if ((obj->mouse_grabbed == 0) && (!e->delete_me))
|
|
|
|
{
|
2009-11-05 07:24:48 -08:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
2010-09-17 23:41:04 -07:00
|
|
|
_evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
|
2011-09-21 03:35:03 -07:00
|
|
|
e->pointer.object.in = eina_list_remove(e->pointer.object.in, obj);
|
2010-09-03 20:53:34 -07:00
|
|
|
if (obj->mouse_in)
|
2010-08-23 19:53:33 -07:00
|
|
|
{
|
2010-09-03 20:53:34 -07:00
|
|
|
obj->mouse_in = 0;
|
|
|
|
if (!obj->delete_me)
|
|
|
|
{
|
|
|
|
if (e->events_frozen <= 0)
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
|
2010-09-03 20:53:34 -07:00
|
|
|
}
|
2010-08-23 19:53:33 -07:00
|
|
|
}
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
|
|
|
}
|
2010-05-04 08:58:10 -07:00
|
|
|
_evas_post_event_callback_call(e);
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-09-21 03:35:03 -07:00
|
|
|
Eina_List *ins;
|
|
|
|
Eina_List *l, *copy;
|
|
|
|
Evas_Event_Mouse_Move ev;
|
|
|
|
Evas_Event_Mouse_Out ev2;
|
|
|
|
Evas_Event_Mouse_In ev3;
|
|
|
|
Evas_Object *obj;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0, event_id2 = 0;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
|
|
|
_evas_object_event_new();
|
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2011-09-21 03:35:03 -07:00
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.cur.output.x = e->pointer.x;
|
|
|
|
ev.cur.output.y = e->pointer.y;
|
|
|
|
ev.cur.canvas.x = e->pointer.x;
|
|
|
|
ev.cur.canvas.y = e->pointer.y;
|
|
|
|
ev.prev.output.x = px;
|
|
|
|
ev.prev.output.y = py;
|
|
|
|
ev.prev.canvas.x = px;
|
|
|
|
ev.prev.canvas.y = py;
|
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
|
|
|
ev2.buttons = e->pointer.button;
|
|
|
|
ev2.output.x = e->pointer.x;
|
|
|
|
ev2.output.y = e->pointer.y;
|
|
|
|
ev2.canvas.x = e->pointer.x;
|
|
|
|
ev2.canvas.y = e->pointer.y;
|
|
|
|
ev2.data = (void *)data;
|
|
|
|
ev2.modifiers = &(e->modifiers);
|
|
|
|
ev2.locks = &(e->locks);
|
|
|
|
ev2.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev2.event_flags = e->default_event_flags;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
|
|
|
ev3.buttons = e->pointer.button;
|
|
|
|
ev3.output.x = e->pointer.x;
|
|
|
|
ev3.output.y = e->pointer.y;
|
|
|
|
ev3.canvas.x = e->pointer.x;
|
|
|
|
ev3.canvas.y = e->pointer.y;
|
|
|
|
ev3.data = (void *)data;
|
|
|
|
ev3.modifiers = &(e->modifiers);
|
|
|
|
ev3.locks = &(e->locks);
|
|
|
|
ev3.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev3.event_flags = e->default_event_flags;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
|
|
|
/* get all new in objects */
|
|
|
|
ins = evas_event_objects_event_list(e, NULL, x, y);
|
|
|
|
/* go thru old list of in objects */
|
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
|
|
|
EINA_LIST_FOREACH(copy, l, obj)
|
|
|
|
{
|
|
|
|
/* if its under the pointer and its visible and its in the new */
|
|
|
|
/* in list */
|
|
|
|
// FIXME: i don't think we need this
|
|
|
|
// evas_object_clip_recalc(obj);
|
2011-11-15 07:10:19 -08:00
|
|
|
if ((e->events_frozen <= 0) &&
|
|
|
|
evas_object_is_in_output_rect(obj, x, y, 1, 1) &&
|
|
|
|
(evas_object_clippers_is_visible(obj) ||
|
|
|
|
obj->mouse_grabbed) &&
|
|
|
|
eina_list_data_find(ins, obj) &&
|
2011-09-21 03:35:03 -07:00
|
|
|
(!evas_event_passes_through(obj)) &&
|
2011-10-31 07:50:00 -07:00
|
|
|
(!evas_event_freezes_through(obj)) &&
|
2011-09-21 03:35:03 -07:00
|
|
|
(!obj->clip.clipees) &&
|
2011-11-15 07:10:19 -08:00
|
|
|
((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y))
|
|
|
|
)
|
2011-09-21 03:35:03 -07:00
|
|
|
{
|
|
|
|
if ((px != x) || (py != y))
|
|
|
|
{
|
2009-11-05 07:24:48 -08:00
|
|
|
ev.cur.canvas.x = e->pointer.x;
|
|
|
|
ev.cur.canvas.y = e->pointer.y;
|
2010-09-17 23:31:41 -07:00
|
|
|
_evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id);
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/* otherwise it has left the object */
|
|
|
|
else
|
|
|
|
{
|
2010-09-03 20:53:34 -07:00
|
|
|
if (obj->mouse_in)
|
|
|
|
{
|
|
|
|
obj->mouse_in = 0;
|
|
|
|
ev2.canvas.x = e->pointer.x;
|
|
|
|
ev2.canvas.y = e->pointer.y;
|
2010-09-17 23:31:41 -07:00
|
|
|
_evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed);
|
2010-09-03 20:53:34 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id);
|
2010-09-03 20:53:34 -07:00
|
|
|
}
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
|
|
|
if (e->delete_me) break;
|
|
|
|
}
|
2010-05-04 08:58:10 -07:00
|
|
|
_evas_post_event_callback_call(e);
|
2010-03-04 06:48:21 -08:00
|
|
|
|
2011-09-21 03:35:03 -07:00
|
|
|
_evas_object_event_new();
|
2010-03-04 06:48:21 -08:00
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id2 = _evas_event_counter;
|
2011-09-21 03:35:03 -07:00
|
|
|
if (copy) copy = eina_list_free(copy);
|
|
|
|
/* go thru our current list of ins */
|
|
|
|
EINA_LIST_FOREACH(ins, l, obj)
|
|
|
|
{
|
2009-11-05 07:24:48 -08:00
|
|
|
ev3.canvas.x = e->pointer.x;
|
|
|
|
ev3.canvas.y = e->pointer.y;
|
2010-09-17 23:31:41 -07:00
|
|
|
_evas_event_havemap_adjust(obj, &ev3.canvas.x, &ev3.canvas.y, obj->mouse_grabbed);
|
2011-09-21 03:35:03 -07:00
|
|
|
/* if its not in the old list of ins send an enter event */
|
|
|
|
if (!eina_list_data_find(e->pointer.object.in, obj))
|
|
|
|
{
|
2010-09-03 20:53:34 -07:00
|
|
|
if (!obj->mouse_in)
|
|
|
|
{
|
|
|
|
obj->mouse_in = 1;
|
|
|
|
if (e->events_frozen <= 0)
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2);
|
2010-09-03 20:53:34 -07:00
|
|
|
}
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
|
|
|
if (e->delete_me) break;
|
|
|
|
}
|
2011-06-28 22:05:35 -07:00
|
|
|
if (e->pointer.mouse_grabbed == 0)
|
|
|
|
{
|
|
|
|
/* free our old list of ins */
|
|
|
|
eina_list_free(e->pointer.object.in);
|
|
|
|
/* and set up the new one */
|
|
|
|
e->pointer.object.in = ins;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* free our cur ins */
|
|
|
|
eina_list_free(ins);
|
|
|
|
}
|
2010-05-04 08:58:10 -07:00
|
|
|
_evas_post_event_callback_call(e);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_unwalk(e);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2005-07-25 02:55:47 -07:00
|
|
|
evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2008-10-21 09:31:05 -07:00
|
|
|
Eina_List *ins;
|
|
|
|
Eina_List *l;
|
2008-01-23 01:00:59 -08:00
|
|
|
Evas_Event_Mouse_In ev;
|
2008-10-21 09:31:05 -07:00
|
|
|
Evas_Object *obj;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
e->pointer.inside = 1;
|
2004-09-17 06:46:55 -07:00
|
|
|
|
|
|
|
if (e->events_frozen > 0) return;
|
2005-07-25 02:55:47 -07:00
|
|
|
e->last_timestamp = timestamp;
|
2004-09-21 02:33:18 -07:00
|
|
|
|
|
|
|
if (e->pointer.mouse_grabbed != 0) return;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2010-03-04 06:48:21 -08:00
|
|
|
_evas_object_event_new();
|
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2008-01-23 01:00:59 -08:00
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2008-07-18 04:04:06 -07:00
|
|
|
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_walk(e);
|
2004-09-17 06:46:55 -07:00
|
|
|
/* get new list of ins */
|
|
|
|
ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y);
|
2008-10-21 09:31:05 -07:00
|
|
|
EINA_LIST_FOREACH(ins, l, obj)
|
2004-09-17 06:46:55 -07:00
|
|
|
{
|
2011-09-23 21:01:36 -07:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
_evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
|
|
|
|
if (!eina_list_data_find(e->pointer.object.in, obj))
|
2011-09-21 03:35:03 -07:00
|
|
|
{
|
2011-09-23 21:01:36 -07:00
|
|
|
if (!obj->mouse_in)
|
2010-09-03 20:53:34 -07:00
|
|
|
{
|
2011-09-23 21:01:36 -07:00
|
|
|
obj->mouse_in = 1;
|
|
|
|
if (e->events_frozen <= 0)
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev, event_id);
|
2010-09-03 20:53:34 -07:00
|
|
|
}
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
|
|
|
if (e->delete_me) break;
|
2004-09-17 06:46:55 -07:00
|
|
|
}
|
|
|
|
/* free our old list of ins */
|
2008-10-21 09:31:05 -07:00
|
|
|
e->pointer.object.in = eina_list_free(e->pointer.object.in);
|
2004-09-17 06:46:55 -07:00
|
|
|
/* and set up the new one */
|
|
|
|
e->pointer.object.in = ins;
|
2010-05-04 08:58:10 -07:00
|
|
|
_evas_post_event_callback_call(e);
|
2005-07-25 02:55:47 -07:00
|
|
|
evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, timestamp, data);
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_unwalk(e);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2005-07-25 02:55:47 -07:00
|
|
|
evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2008-01-23 01:00:59 -08:00
|
|
|
Evas_Event_Mouse_Out ev;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2008-07-18 04:04:06 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
e->pointer.inside = 0;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2004-09-17 06:46:55 -07:00
|
|
|
if (e->events_frozen > 0) return;
|
2005-07-25 02:55:47 -07:00
|
|
|
e->last_timestamp = timestamp;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2010-03-04 06:48:21 -08:00
|
|
|
_evas_object_event_new();
|
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2008-01-23 01:00:59 -08:00
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2008-07-18 04:04:06 -07:00
|
|
|
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_walk(e);
|
2005-05-21 19:49:50 -07:00
|
|
|
/* if our mouse button is grabbed to any objects */
|
2004-09-17 06:46:55 -07:00
|
|
|
if (e->pointer.mouse_grabbed == 0)
|
|
|
|
{
|
2011-09-21 03:35:03 -07:00
|
|
|
/* go thru old list of in objects */
|
|
|
|
Eina_List *l, *copy;
|
|
|
|
Evas_Object *obj;
|
2004-09-17 06:46:55 -07:00
|
|
|
|
2011-09-21 03:35:03 -07:00
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
|
|
|
EINA_LIST_FOREACH(copy, l, obj)
|
|
|
|
{
|
2009-11-05 07:24:48 -08:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
2010-09-17 23:31:41 -07:00
|
|
|
_evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
|
2010-09-03 20:53:34 -07:00
|
|
|
if (obj->mouse_in)
|
2010-08-23 19:53:33 -07:00
|
|
|
{
|
2010-09-03 20:53:34 -07:00
|
|
|
obj->mouse_in = 0;
|
|
|
|
if (!obj->delete_me)
|
|
|
|
{
|
|
|
|
if (e->events_frozen <= 0)
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
|
2010-09-03 20:53:34 -07:00
|
|
|
}
|
2010-08-23 19:53:33 -07:00
|
|
|
}
|
2011-09-21 03:35:03 -07:00
|
|
|
if (e->delete_me) break;
|
|
|
|
}
|
|
|
|
if (copy) copy = eina_list_free(copy);
|
|
|
|
/* free our old list of ins */
|
|
|
|
e->pointer.object.in = eina_list_free(e->pointer.object.in);
|
2010-05-04 08:58:10 -07:00
|
|
|
_evas_post_event_callback_call(e);
|
2004-09-17 06:46:55 -07:00
|
|
|
}
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_unwalk(e);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2010-01-16 04:20:22 -08:00
|
|
|
EAPI void
|
2011-09-21 03:35:03 -07:00
|
|
|
evas_event_feed_multi_down(Evas *e,
|
|
|
|
int d, int x, int y,
|
2010-01-17 00:52:21 -08:00
|
|
|
double rad, double radx, double rady,
|
|
|
|
double pres, double ang,
|
|
|
|
double fx, double fy,
|
2011-09-21 03:35:03 -07:00
|
|
|
Evas_Button_Flags flags, unsigned int timestamp,
|
2010-01-17 00:52:21 -08:00
|
|
|
const void *data)
|
2010-01-16 04:20:22 -08:00
|
|
|
{
|
|
|
|
Eina_List *l, *copy;
|
|
|
|
Evas_Event_Multi_Down ev;
|
|
|
|
Evas_Object *obj;
|
2011-12-12 21:59:36 -08:00
|
|
|
int addgrab = 0;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2010-01-16 04:20:22 -08:00
|
|
|
|
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
|
2011-12-12 21:59:36 -08:00
|
|
|
e->pointer.downs++;
|
2010-01-16 04:20:22 -08:00
|
|
|
if (e->events_frozen > 0) return;
|
|
|
|
e->last_timestamp = timestamp;
|
|
|
|
|
2010-03-04 06:48:21 -08:00
|
|
|
_evas_object_event_new();
|
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2010-01-16 04:20:22 -08:00
|
|
|
ev.device = d;
|
|
|
|
ev.output.x = x;
|
|
|
|
ev.output.y = y;
|
|
|
|
ev.canvas.x = x;
|
|
|
|
ev.canvas.y = y;
|
|
|
|
ev.radius = rad;
|
|
|
|
ev.radius_x = radx;
|
|
|
|
ev.radius_y = rady;
|
2010-01-17 00:52:21 -08:00
|
|
|
ev.pressure = pres;
|
|
|
|
ev.angle = ang;
|
|
|
|
ev.canvas.xsub = fx;
|
|
|
|
ev.canvas.ysub = fy;
|
2010-01-16 04:20:22 -08:00
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.flags = flags;
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2010-01-16 04:20:22 -08:00
|
|
|
|
|
|
|
_evas_walk(e);
|
From: EunMi Lee <eunmi15.lee@samsung.com>
Subject: [E-devel] [Patch] [Evas] Patch to provide information of
touched points
Hello,
I made a new patch to get information of current touched point instead
of Touch Event.
I added touch_points (Eina_List) to the Evas structure and it maintains touched points on the evas.
New touched point is added to the touch_points when we get Mouse_Down and Multi_Down,
touched point is updated when we get Mouse_Move and Mult_Move,
and touched point is removed when we get Mouse_Up and Multi_Up.
The each touch point has coordinate, id and state information as follows:
id - identifier. 0 for Mouse Event and device id for Multi Event. coordinate - (x, y) coordinate of point.
state - state of point. type is Evas_Touch_Point_State enum.
(EVAS_TOUCH_POINT_DOWN, EVAS_TOUCH_POINT_UP, EVAS_TOUCH_POINT_MOVE,
EVAS_TOUCH_POINT_STILL, EVAS_TOUCH_POINT_CANCEL)
There are 4 new APIs to get touch point's information as follows:
unsigned int evas_touch_point_list_count(Evas *e);
void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y);
int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n);
Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n);
I added APIs to get each information instead of exposing whole
structure to make it easy to expand in the future as you mentioned in
the below e-mail :)
SVN revision: 64373
2011-10-24 22:03:50 -07:00
|
|
|
/* append new touch point to the touch point list */
|
|
|
|
_evas_touch_point_append(e, d, x, y);
|
2011-12-12 21:59:36 -08:00
|
|
|
if (e->pointer.mouse_grabbed == 0)
|
|
|
|
{
|
|
|
|
if (e->pointer.downs > 1) addgrab = e->pointer.downs - 1;
|
|
|
|
}
|
2010-01-16 04:20:22 -08:00
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
2011-09-25 19:45:06 -07:00
|
|
|
EINA_LIST_FOREACH(copy, l, obj)
|
|
|
|
{
|
|
|
|
if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB)
|
|
|
|
{
|
2011-12-12 21:59:36 -08:00
|
|
|
obj->mouse_grabbed += addgrab + 1;
|
|
|
|
e->pointer.mouse_grabbed += addgrab + 1;
|
2011-09-25 19:45:06 -07:00
|
|
|
}
|
|
|
|
}
|
2010-01-16 04:20:22 -08:00
|
|
|
EINA_LIST_FOREACH(copy, l, obj)
|
|
|
|
{
|
2011-09-23 21:01:36 -07:00
|
|
|
ev.canvas.x = x;
|
|
|
|
ev.canvas.y = y;
|
|
|
|
ev.canvas.xsub = fx;
|
|
|
|
ev.canvas.ysub = fy;
|
|
|
|
_evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
|
|
|
|
if (x != ev.canvas.x)
|
|
|
|
ev.canvas.xsub = ev.canvas.x; // fixme - lost precision
|
|
|
|
if (y != ev.canvas.y)
|
|
|
|
ev.canvas.ysub = ev.canvas.y; // fixme - lost precision
|
|
|
|
if (e->events_frozen <= 0)
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_DOWN, &ev, event_id);
|
2011-09-21 03:35:03 -07:00
|
|
|
if (e->delete_me) break;
|
2010-01-16 04:20:22 -08:00
|
|
|
}
|
|
|
|
if (copy) eina_list_free(copy);
|
2010-05-04 08:58:10 -07:00
|
|
|
_evas_post_event_callback_call(e);
|
From: EunMi Lee <eunmi15.lee@samsung.com>
Subject: [E-devel] [Patch] [Evas] Patch to provide information of
touched points
Hello,
I made a new patch to get information of current touched point instead
of Touch Event.
I added touch_points (Eina_List) to the Evas structure and it maintains touched points on the evas.
New touched point is added to the touch_points when we get Mouse_Down and Multi_Down,
touched point is updated when we get Mouse_Move and Mult_Move,
and touched point is removed when we get Mouse_Up and Multi_Up.
The each touch point has coordinate, id and state information as follows:
id - identifier. 0 for Mouse Event and device id for Multi Event. coordinate - (x, y) coordinate of point.
state - state of point. type is Evas_Touch_Point_State enum.
(EVAS_TOUCH_POINT_DOWN, EVAS_TOUCH_POINT_UP, EVAS_TOUCH_POINT_MOVE,
EVAS_TOUCH_POINT_STILL, EVAS_TOUCH_POINT_CANCEL)
There are 4 new APIs to get touch point's information as follows:
unsigned int evas_touch_point_list_count(Evas *e);
void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y);
int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n);
Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n);
I added APIs to get each information instead of exposing whole
structure to make it easy to expand in the future as you mentioned in
the below e-mail :)
SVN revision: 64373
2011-10-24 22:03:50 -07:00
|
|
|
/* update touch point's state to EVAS_TOUCH_POINT_STILL */
|
|
|
|
_evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_STILL);
|
2010-01-16 04:20:22 -08:00
|
|
|
_evas_unwalk(e);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2011-09-21 03:35:03 -07:00
|
|
|
evas_event_feed_multi_up(Evas *e,
|
|
|
|
int d, int x, int y,
|
2010-01-17 00:52:21 -08:00
|
|
|
double rad, double radx, double rady,
|
|
|
|
double pres, double ang,
|
|
|
|
double fx, double fy,
|
2011-09-21 03:35:03 -07:00
|
|
|
Evas_Button_Flags flags, unsigned int timestamp,
|
2010-01-17 00:52:21 -08:00
|
|
|
const void *data)
|
2010-01-16 04:20:22 -08:00
|
|
|
{
|
|
|
|
Eina_List *l, *copy;
|
|
|
|
Evas_Event_Multi_Up ev;
|
|
|
|
Evas_Object *obj;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2010-01-16 04:20:22 -08:00
|
|
|
|
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
|
2011-12-12 21:59:36 -08:00
|
|
|
e->pointer.downs--;
|
2010-01-16 04:20:22 -08:00
|
|
|
if (e->events_frozen > 0) return;
|
|
|
|
e->last_timestamp = timestamp;
|
|
|
|
|
2010-03-04 06:48:21 -08:00
|
|
|
_evas_object_event_new();
|
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2010-01-16 04:20:22 -08:00
|
|
|
ev.device = d;
|
|
|
|
ev.output.x = x;
|
|
|
|
ev.output.y = y;
|
|
|
|
ev.canvas.x = x;
|
|
|
|
ev.canvas.y = y;
|
|
|
|
ev.radius = rad;
|
|
|
|
ev.radius_x = radx;
|
|
|
|
ev.radius_y = rady;
|
2010-01-17 00:52:21 -08:00
|
|
|
ev.pressure = pres;
|
|
|
|
ev.angle = ang;
|
|
|
|
ev.canvas.xsub = fx;
|
|
|
|
ev.canvas.ysub = fy;
|
2010-01-16 04:20:22 -08:00
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.flags = flags;
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2010-01-16 04:20:22 -08:00
|
|
|
_evas_walk(e);
|
From: EunMi Lee <eunmi15.lee@samsung.com>
Subject: [E-devel] [Patch] [Evas] Patch to provide information of
touched points
Hello,
I made a new patch to get information of current touched point instead
of Touch Event.
I added touch_points (Eina_List) to the Evas structure and it maintains touched points on the evas.
New touched point is added to the touch_points when we get Mouse_Down and Multi_Down,
touched point is updated when we get Mouse_Move and Mult_Move,
and touched point is removed when we get Mouse_Up and Multi_Up.
The each touch point has coordinate, id and state information as follows:
id - identifier. 0 for Mouse Event and device id for Multi Event. coordinate - (x, y) coordinate of point.
state - state of point. type is Evas_Touch_Point_State enum.
(EVAS_TOUCH_POINT_DOWN, EVAS_TOUCH_POINT_UP, EVAS_TOUCH_POINT_MOVE,
EVAS_TOUCH_POINT_STILL, EVAS_TOUCH_POINT_CANCEL)
There are 4 new APIs to get touch point's information as follows:
unsigned int evas_touch_point_list_count(Evas *e);
void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y);
int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n);
Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n);
I added APIs to get each information instead of exposing whole
structure to make it easy to expand in the future as you mentioned in
the below e-mail :)
SVN revision: 64373
2011-10-24 22:03:50 -07:00
|
|
|
/* update released touch point */
|
|
|
|
_evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_UP);
|
2010-01-16 04:20:22 -08:00
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
|
|
|
EINA_LIST_FOREACH(copy, l, obj)
|
|
|
|
{
|
2011-09-23 21:01:36 -07:00
|
|
|
ev.canvas.x = x;
|
|
|
|
ev.canvas.y = y;
|
|
|
|
ev.canvas.xsub = fx;
|
|
|
|
ev.canvas.ysub = fy;
|
|
|
|
_evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
|
|
|
|
if (x != ev.canvas.x)
|
|
|
|
ev.canvas.xsub = ev.canvas.x; // fixme - lost precision
|
|
|
|
if (y != ev.canvas.y)
|
|
|
|
ev.canvas.ysub = ev.canvas.y; // fixme - lost precision
|
|
|
|
if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) &&
|
|
|
|
(obj->mouse_grabbed > 0))
|
2011-06-13 03:00:25 -07:00
|
|
|
{
|
2011-09-23 21:01:36 -07:00
|
|
|
obj->mouse_grabbed--;
|
|
|
|
e->pointer.mouse_grabbed--;
|
2011-06-13 03:00:25 -07:00
|
|
|
}
|
2011-09-23 21:01:36 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_UP, &ev, event_id);
|
2010-01-16 04:20:22 -08:00
|
|
|
if (e->delete_me) break;
|
|
|
|
}
|
|
|
|
if (copy) copy = eina_list_free(copy);
|
2011-06-23 23:59:30 -07:00
|
|
|
if ((e->pointer.mouse_grabbed == 0) && !_post_up_handle(e, timestamp, data))
|
2011-06-13 03:00:25 -07:00
|
|
|
_evas_post_event_callback_call(e);
|
From: EunMi Lee <eunmi15.lee@samsung.com>
Subject: [E-devel] [Patch] [Evas] Patch to provide information of
touched points
Hello,
I made a new patch to get information of current touched point instead
of Touch Event.
I added touch_points (Eina_List) to the Evas structure and it maintains touched points on the evas.
New touched point is added to the touch_points when we get Mouse_Down and Multi_Down,
touched point is updated when we get Mouse_Move and Mult_Move,
and touched point is removed when we get Mouse_Up and Multi_Up.
The each touch point has coordinate, id and state information as follows:
id - identifier. 0 for Mouse Event and device id for Multi Event. coordinate - (x, y) coordinate of point.
state - state of point. type is Evas_Touch_Point_State enum.
(EVAS_TOUCH_POINT_DOWN, EVAS_TOUCH_POINT_UP, EVAS_TOUCH_POINT_MOVE,
EVAS_TOUCH_POINT_STILL, EVAS_TOUCH_POINT_CANCEL)
There are 4 new APIs to get touch point's information as follows:
unsigned int evas_touch_point_list_count(Evas *e);
void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y);
int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n);
Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n);
I added APIs to get each information instead of exposing whole
structure to make it easy to expand in the future as you mentioned in
the below e-mail :)
SVN revision: 64373
2011-10-24 22:03:50 -07:00
|
|
|
/* remove released touch point from the touch point list */
|
|
|
|
_evas_touch_point_remove(e, d);
|
2010-01-16 04:20:22 -08:00
|
|
|
_evas_unwalk(e);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2011-09-21 03:35:03 -07:00
|
|
|
evas_event_feed_multi_move(Evas *e,
|
|
|
|
int d, int x, int y,
|
2010-01-17 00:52:21 -08:00
|
|
|
double rad, double radx, double rady,
|
|
|
|
double pres, double ang,
|
|
|
|
double fx, double fy,
|
|
|
|
unsigned int timestamp, const void *data)
|
2010-01-16 04:20:22 -08:00
|
|
|
{
|
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
|
|
|
|
if (e->events_frozen > 0) return;
|
|
|
|
e->last_timestamp = timestamp;
|
|
|
|
|
|
|
|
if (!e->pointer.inside) return;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2010-01-16 04:20:22 -08:00
|
|
|
_evas_walk(e);
|
From: EunMi Lee <eunmi15.lee@samsung.com>
Subject: [E-devel] [Patch] [Evas] Patch to provide information of
touched points
Hello,
I made a new patch to get information of current touched point instead
of Touch Event.
I added touch_points (Eina_List) to the Evas structure and it maintains touched points on the evas.
New touched point is added to the touch_points when we get Mouse_Down and Multi_Down,
touched point is updated when we get Mouse_Move and Mult_Move,
and touched point is removed when we get Mouse_Up and Multi_Up.
The each touch point has coordinate, id and state information as follows:
id - identifier. 0 for Mouse Event and device id for Multi Event. coordinate - (x, y) coordinate of point.
state - state of point. type is Evas_Touch_Point_State enum.
(EVAS_TOUCH_POINT_DOWN, EVAS_TOUCH_POINT_UP, EVAS_TOUCH_POINT_MOVE,
EVAS_TOUCH_POINT_STILL, EVAS_TOUCH_POINT_CANCEL)
There are 4 new APIs to get touch point's information as follows:
unsigned int evas_touch_point_list_count(Evas *e);
void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y);
int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n);
Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n);
I added APIs to get each information instead of exposing whole
structure to make it easy to expand in the future as you mentioned in
the below e-mail :)
SVN revision: 64373
2011-10-24 22:03:50 -07:00
|
|
|
/* update moved touch point */
|
|
|
|
_evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_MOVE);
|
2010-01-16 04:20:22 -08:00
|
|
|
/* if our mouse button is grabbed to any objects */
|
|
|
|
if (e->pointer.mouse_grabbed > 0)
|
|
|
|
{
|
2011-09-21 03:35:03 -07:00
|
|
|
/* go thru old list of in objects */
|
|
|
|
Eina_List *l, *copy;
|
2010-01-16 04:20:22 -08:00
|
|
|
Evas_Event_Multi_Move ev;
|
|
|
|
Evas_Object *obj;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2010-01-16 04:20:22 -08:00
|
|
|
|
2011-09-21 03:35:03 -07:00
|
|
|
_evas_object_event_new();
|
2010-03-04 06:48:21 -08:00
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2010-01-16 04:20:22 -08:00
|
|
|
ev.device = d;
|
|
|
|
ev.cur.output.x = x;
|
|
|
|
ev.cur.output.y = y;
|
|
|
|
ev.cur.canvas.x = x;
|
|
|
|
ev.cur.canvas.y = y;
|
|
|
|
ev.radius = rad;
|
|
|
|
ev.radius_x = radx;
|
|
|
|
ev.radius_y = rady;
|
2010-01-17 00:52:21 -08:00
|
|
|
ev.pressure = pres;
|
|
|
|
ev.angle = ang;
|
|
|
|
ev.cur.canvas.xsub = fx;
|
|
|
|
ev.cur.canvas.ysub = fy;
|
2010-01-16 04:20:22 -08:00
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2010-01-16 04:20:22 -08:00
|
|
|
|
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
|
|
|
EINA_LIST_FOREACH(copy, l, obj)
|
|
|
|
{
|
2011-11-15 07:10:19 -08:00
|
|
|
if ((e->events_frozen <= 0) &&
|
|
|
|
(evas_object_clippers_is_visible(obj) || obj->mouse_grabbed) &&
|
2011-09-23 21:01:36 -07:00
|
|
|
(!evas_event_passes_through(obj)) &&
|
2011-10-31 07:50:00 -07:00
|
|
|
(!evas_event_freezes_through(obj)) &&
|
2011-09-23 21:01:36 -07:00
|
|
|
(!obj->clip.clipees))
|
2010-01-16 04:20:22 -08:00
|
|
|
{
|
2010-01-17 00:52:21 -08:00
|
|
|
ev.cur.canvas.x = x;
|
|
|
|
ev.cur.canvas.y = y;
|
|
|
|
ev.cur.canvas.xsub = fx;
|
|
|
|
ev.cur.canvas.ysub = fy;
|
2010-09-17 23:31:41 -07:00
|
|
|
_evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
|
2011-09-21 03:35:03 -07:00
|
|
|
if (x != ev.cur.canvas.x)
|
2010-01-17 00:52:21 -08:00
|
|
|
ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision
|
|
|
|
if (y != ev.cur.canvas.y)
|
|
|
|
ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id);
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
2010-01-16 04:20:22 -08:00
|
|
|
if (e->delete_me) break;
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
2010-05-04 08:58:10 -07:00
|
|
|
_evas_post_event_callback_call(e);
|
2010-01-16 04:20:22 -08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-09-21 03:35:03 -07:00
|
|
|
Eina_List *ins;
|
|
|
|
Eina_List *l, *copy;
|
|
|
|
Evas_Event_Multi_Move ev;
|
|
|
|
Evas_Object *obj;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
|
|
|
_evas_object_event_new();
|
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2011-09-21 03:35:03 -07:00
|
|
|
ev.device = d;
|
|
|
|
ev.cur.output.x = x;
|
|
|
|
ev.cur.output.y = y;
|
|
|
|
ev.cur.canvas.x = x;
|
|
|
|
ev.cur.canvas.y = y;
|
2010-01-16 04:20:22 -08:00
|
|
|
ev.radius = rad;
|
|
|
|
ev.radius_x = radx;
|
|
|
|
ev.radius_y = rady;
|
2010-01-17 00:52:21 -08:00
|
|
|
ev.pressure = pres;
|
|
|
|
ev.angle = ang;
|
|
|
|
ev.cur.canvas.xsub = fx;
|
|
|
|
ev.cur.canvas.ysub = fy;
|
2011-09-21 03:35:03 -07:00
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
|
|
|
/* get all new in objects */
|
|
|
|
ins = evas_event_objects_event_list(e, NULL, x, y);
|
|
|
|
/* go thru old list of in objects */
|
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
|
|
|
EINA_LIST_FOREACH(copy, l, obj)
|
|
|
|
{
|
|
|
|
/* if its under the pointer and its visible and its in the new */
|
|
|
|
/* in list */
|
|
|
|
// FIXME: i don't think we need this
|
|
|
|
// evas_object_clip_recalc(obj);
|
2011-11-15 07:10:19 -08:00
|
|
|
if ((e->events_frozen <= 0) &&
|
|
|
|
evas_object_is_in_output_rect(obj, x, y, 1, 1) &&
|
|
|
|
(evas_object_clippers_is_visible(obj) ||
|
|
|
|
obj->mouse_grabbed) &&
|
|
|
|
eina_list_data_find(ins, obj) &&
|
2011-09-21 03:35:03 -07:00
|
|
|
(!evas_event_passes_through(obj)) &&
|
2011-10-31 07:50:00 -07:00
|
|
|
(!evas_event_freezes_through(obj)) &&
|
2011-09-21 03:35:03 -07:00
|
|
|
(!obj->clip.clipees) &&
|
2011-11-15 07:10:19 -08:00
|
|
|
((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y))
|
|
|
|
)
|
2011-09-21 03:35:03 -07:00
|
|
|
{
|
2010-01-16 04:20:22 -08:00
|
|
|
ev.cur.canvas.x = x;
|
|
|
|
ev.cur.canvas.y = y;
|
2010-01-17 00:52:21 -08:00
|
|
|
ev.cur.canvas.xsub = fx;
|
|
|
|
ev.cur.canvas.ysub = fy;
|
2010-09-17 23:31:41 -07:00
|
|
|
_evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
|
2011-09-21 03:35:03 -07:00
|
|
|
if (x != ev.cur.canvas.x)
|
2010-01-17 00:52:21 -08:00
|
|
|
ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision
|
|
|
|
if (y != ev.cur.canvas.y)
|
|
|
|
ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id);
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
|
|
|
if (e->delete_me) break;
|
|
|
|
}
|
|
|
|
if (copy) copy = eina_list_free(copy);
|
2011-06-28 22:05:35 -07:00
|
|
|
if (e->pointer.mouse_grabbed == 0)
|
|
|
|
{
|
|
|
|
/* free our old list of ins */
|
|
|
|
eina_list_free(e->pointer.object.in);
|
|
|
|
/* and set up the new one */
|
|
|
|
e->pointer.object.in = ins;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* free our cur ins */
|
|
|
|
eina_list_free(ins);
|
|
|
|
}
|
2010-05-04 08:58:10 -07:00
|
|
|
_evas_post_event_callback_call(e);
|
2010-01-16 04:20:22 -08:00
|
|
|
}
|
|
|
|
_evas_unwalk(e);
|
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2005-07-25 02:55:47 -07:00
|
|
|
evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data)
|
2002-12-16 16:00:38 -08:00
|
|
|
{
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2002-12-16 16:00:38 -08:00
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2011-11-11 23:51:58 -08:00
|
|
|
|
2002-12-16 16:00:38 -08:00
|
|
|
if (!keyname) return;
|
|
|
|
if (e->events_frozen > 0) return;
|
2005-07-25 02:55:47 -07:00
|
|
|
e->last_timestamp = timestamp;
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_walk(e);
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2011-11-11 23:01:38 -08:00
|
|
|
Evas_Event_Key_Down ev;
|
|
|
|
Eina_Bool exclusive;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2011-11-11 23:01:38 -08:00
|
|
|
_evas_object_event_new();
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2011-11-11 23:01:38 -08:00
|
|
|
exclusive = EINA_FALSE;
|
|
|
|
ev.keyname = (char *)keyname;
|
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.key = key;
|
|
|
|
ev.string = string;
|
|
|
|
ev.compose = compose;
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2011-11-11 23:01:38 -08:00
|
|
|
|
|
|
|
if (e->grabs)
|
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
Evas_Key_Grab *g;
|
|
|
|
|
|
|
|
e->walking_grabs++;
|
|
|
|
EINA_LIST_FOREACH(e->grabs, l, g)
|
|
|
|
{
|
|
|
|
if (g->just_added)
|
2011-09-21 03:35:03 -07:00
|
|
|
{
|
2011-11-12 00:06:30 -08:00
|
|
|
g->just_added = EINA_FALSE;
|
2011-11-11 23:01:38 -08:00
|
|
|
continue;
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
2011-11-11 23:01:38 -08:00
|
|
|
if (g->delete_me) continue;
|
|
|
|
if (((e->modifiers.mask & g->modifiers) ||
|
|
|
|
(g->modifiers == e->modifiers.mask)) &&
|
|
|
|
(!strcmp(keyname, g->keyname)))
|
2011-09-21 03:35:03 -07:00
|
|
|
{
|
2011-11-11 23:01:38 -08:00
|
|
|
if (!(e->modifiers.mask & g->not_modifiers))
|
2011-09-21 03:35:03 -07:00
|
|
|
{
|
2011-11-11 23:51:58 -08:00
|
|
|
if (e->events_frozen <= 0 &&
|
|
|
|
!evas_event_freezes_through(g->object))
|
2011-11-11 23:01:38 -08:00
|
|
|
evas_object_event_callback_call(g->object,
|
|
|
|
EVAS_CALLBACK_KEY_DOWN,
|
2011-12-14 22:23:53 -08:00
|
|
|
&ev, event_id);
|
2011-11-11 23:01:38 -08:00
|
|
|
if (g->exclusive) exclusive = EINA_TRUE;
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
|
|
|
}
|
2011-11-11 23:01:38 -08:00
|
|
|
if (e->delete_me) break;
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
2011-11-11 23:01:38 -08:00
|
|
|
e->walking_grabs--;
|
|
|
|
if (e->walking_grabs <= 0)
|
2011-09-21 03:35:03 -07:00
|
|
|
{
|
2011-11-11 23:01:38 -08:00
|
|
|
while (e->delete_grabs > 0)
|
|
|
|
{
|
|
|
|
e->delete_grabs--;
|
|
|
|
for (l = e->grabs; l;)
|
|
|
|
{
|
|
|
|
g = eina_list_data_get(l);
|
|
|
|
l = eina_list_next(l);
|
|
|
|
if (g->delete_me)
|
|
|
|
evas_key_grab_free(g->object, g->keyname, g->modifiers,
|
|
|
|
g->not_modifiers);
|
|
|
|
}
|
|
|
|
}
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
2003-01-05 04:55:37 -08:00
|
|
|
}
|
2011-11-11 23:01:38 -08:00
|
|
|
if ((e->focused) && (!exclusive))
|
|
|
|
{
|
2011-11-11 23:51:58 -08:00
|
|
|
if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused))
|
2011-11-11 23:01:38 -08:00
|
|
|
evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_DOWN,
|
2011-12-14 22:23:53 -08:00
|
|
|
&ev, event_id);
|
2011-11-11 23:01:38 -08:00
|
|
|
}
|
|
|
|
_evas_post_event_callback_call(e);
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_unwalk(e);
|
2002-12-16 16:00:38 -08:00
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2005-07-25 02:55:47 -07:00
|
|
|
evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data)
|
2002-12-16 16:00:38 -08:00
|
|
|
{
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2002-12-16 16:00:38 -08:00
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
if (!keyname) return;
|
|
|
|
if (e->events_frozen > 0) return;
|
2005-07-25 02:55:47 -07:00
|
|
|
e->last_timestamp = timestamp;
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_walk(e);
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2011-11-11 23:01:38 -08:00
|
|
|
Evas_Event_Key_Up ev;
|
|
|
|
Eina_Bool exclusive;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2011-11-11 23:01:38 -08:00
|
|
|
_evas_object_event_new();
|
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2011-11-11 23:01:38 -08:00
|
|
|
exclusive = EINA_FALSE;
|
|
|
|
ev.keyname = (char *)keyname;
|
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.key = key;
|
|
|
|
ev.string = string;
|
|
|
|
ev.compose = compose;
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2011-11-11 23:01:38 -08:00
|
|
|
|
|
|
|
if (e->grabs)
|
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
Evas_Key_Grab *g;
|
2011-09-21 03:35:03 -07:00
|
|
|
|
2011-11-11 23:01:38 -08:00
|
|
|
e->walking_grabs++;
|
|
|
|
EINA_LIST_FOREACH(e->grabs, l, g)
|
|
|
|
{
|
|
|
|
if (g->just_added)
|
2011-09-21 03:35:03 -07:00
|
|
|
{
|
2011-11-12 00:06:30 -08:00
|
|
|
g->just_added = EINA_FALSE;
|
2011-11-11 23:01:38 -08:00
|
|
|
continue;
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
2011-11-11 23:01:38 -08:00
|
|
|
if (g->delete_me) continue;
|
|
|
|
if (((e->modifiers.mask & g->modifiers) ||
|
|
|
|
(g->modifiers == e->modifiers.mask)) &&
|
|
|
|
(!((e->modifiers.mask & g->not_modifiers) ||
|
|
|
|
(g->not_modifiers == ~e->modifiers.mask))) &&
|
|
|
|
(!strcmp(keyname, g->keyname)))
|
2011-09-21 03:35:03 -07:00
|
|
|
{
|
2011-11-11 23:51:58 -08:00
|
|
|
if (e->events_frozen <= 0 &&
|
|
|
|
!evas_event_freezes_through(g->object))
|
2011-11-11 23:01:38 -08:00
|
|
|
evas_object_event_callback_call(g->object,
|
2011-12-14 22:23:53 -08:00
|
|
|
EVAS_CALLBACK_KEY_UP, &ev, event_id);
|
2011-11-11 23:01:38 -08:00
|
|
|
if (g->exclusive) exclusive = EINA_TRUE;
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
2011-11-11 23:01:38 -08:00
|
|
|
if (e->delete_me) break;
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
2011-11-11 23:01:38 -08:00
|
|
|
e->walking_grabs--;
|
|
|
|
if (e->walking_grabs <= 0)
|
2011-09-21 03:35:03 -07:00
|
|
|
{
|
2011-11-11 23:01:38 -08:00
|
|
|
while (e->delete_grabs > 0)
|
|
|
|
{
|
|
|
|
Eina_List *ll, *l_next;
|
|
|
|
Evas_Key_Grab *gr;
|
|
|
|
|
|
|
|
e->delete_grabs--;
|
|
|
|
EINA_LIST_FOREACH_SAFE(e->grabs, ll, l_next, gr)
|
|
|
|
{
|
|
|
|
if (gr->delete_me)
|
|
|
|
evas_key_grab_free(gr->object, gr->keyname,
|
|
|
|
gr->modifiers, gr->not_modifiers);
|
|
|
|
}
|
|
|
|
}
|
2011-09-21 03:35:03 -07:00
|
|
|
}
|
2003-01-05 04:55:37 -08:00
|
|
|
}
|
2011-11-11 23:01:38 -08:00
|
|
|
if ((e->focused) && (!exclusive))
|
|
|
|
{
|
2011-11-11 23:51:58 -08:00
|
|
|
if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused))
|
2011-11-11 23:01:38 -08:00
|
|
|
evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_UP,
|
2011-12-14 22:23:53 -08:00
|
|
|
&ev, event_id);
|
2011-11-11 23:01:38 -08:00
|
|
|
}
|
|
|
|
_evas_post_event_callback_call(e);
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_unwalk(e);
|
2002-12-16 16:00:38 -08:00
|
|
|
}
|
|
|
|
|
2008-03-31 14:38:38 -07:00
|
|
|
EAPI void
|
|
|
|
evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data)
|
|
|
|
{
|
2008-10-21 09:31:05 -07:00
|
|
|
Eina_List *l, *copy;
|
2008-03-31 14:38:38 -07:00
|
|
|
Evas_Event_Hold ev;
|
2008-10-21 09:31:05 -07:00
|
|
|
Evas_Object *obj;
|
2011-12-14 22:23:53 -08:00
|
|
|
int event_id = 0;
|
2008-03-31 14:38:38 -07:00
|
|
|
|
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
|
|
|
|
if (e->events_frozen > 0) return;
|
|
|
|
e->last_timestamp = timestamp;
|
|
|
|
|
2010-03-04 06:48:21 -08:00
|
|
|
_evas_object_event_new();
|
|
|
|
|
2011-12-14 22:23:53 -08:00
|
|
|
event_id = _evas_event_counter;
|
2008-03-31 14:38:38 -07:00
|
|
|
ev.hold = hold;
|
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.timestamp = timestamp;
|
2011-12-16 01:24:18 -08:00
|
|
|
ev.event_flags = e->default_event_flags;
|
2008-07-18 04:04:06 -07:00
|
|
|
|
2008-03-31 14:38:38 -07:00
|
|
|
_evas_walk(e);
|
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
2008-10-21 09:31:05 -07:00
|
|
|
EINA_LIST_FOREACH(copy, l, obj)
|
2008-03-31 14:38:38 -07:00
|
|
|
{
|
2011-11-11 23:51:58 -08:00
|
|
|
if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj))
|
2011-12-14 22:23:53 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_HOLD, &ev, event_id);
|
2011-09-21 03:35:03 -07:00
|
|
|
if (e->delete_me) break;
|
2008-03-31 14:38:38 -07:00
|
|
|
}
|
2008-10-21 09:31:05 -07:00
|
|
|
if (copy) copy = eina_list_free(copy);
|
2010-05-04 08:58:10 -07:00
|
|
|
_evas_post_event_callback_call(e);
|
2008-03-31 14:38:38 -07:00
|
|
|
_evas_unwalk(e);
|
2010-03-22 00:04:04 -07:00
|
|
|
_evas_object_event_new();
|
2008-03-31 14:38:38 -07:00
|
|
|
}
|
|
|
|
|
2011-10-27 03:36:09 -07:00
|
|
|
EAPI void
|
|
|
|
evas_object_freeze_events_set(Evas_Object *obj, Eina_Bool freeze)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
|
|
|
|
freeze = !!freeze;
|
|
|
|
if (obj->freeze_events == freeze) return;
|
|
|
|
obj->freeze_events = freeze;
|
|
|
|
evas_object_smart_member_cache_invalidate(obj, EINA_FALSE, EINA_TRUE);
|
|
|
|
if (evas_object_is_in_output_rect(obj,
|
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y, 1, 1) &&
|
|
|
|
((!obj->precise_is_inside) ||
|
|
|
|
(evas_object_is_inside(obj,
|
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y))))
|
|
|
|
evas_event_feed_mouse_move(obj->layer->evas,
|
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
|
|
|
obj->layer->evas->last_timestamp,
|
|
|
|
NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
evas_object_freeze_events_get(const Evas_Object *obj)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
2011-11-11 22:12:42 -08:00
|
|
|
return EINA_FALSE;
|
2011-10-27 03:36:09 -07:00
|
|
|
MAGIC_CHECK_END();
|
|
|
|
return obj->freeze_events;
|
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2009-06-17 03:01:52 -07:00
|
|
|
evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2010-08-23 19:55:09 -07:00
|
|
|
pass = !!pass;
|
|
|
|
if (obj->pass_events == pass) return;
|
2002-11-08 00:02:15 -08:00
|
|
|
obj->pass_events = pass;
|
2011-10-27 03:36:09 -07:00
|
|
|
evas_object_smart_member_cache_invalidate(obj, EINA_TRUE, EINA_FALSE);
|
2005-05-21 19:49:50 -07:00
|
|
|
if (evas_object_is_in_output_rect(obj,
|
2011-09-21 03:35:03 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y, 1, 1) &&
|
2007-07-23 07:22:57 -07:00
|
|
|
((!obj->precise_is_inside) ||
|
2011-09-21 03:35:03 -07:00
|
|
|
(evas_object_is_inside(obj,
|
2007-07-23 07:22:57 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y))))
|
2005-05-21 19:49:50 -07:00
|
|
|
evas_event_feed_mouse_move(obj->layer->evas,
|
2011-09-21 03:35:03 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
|
|
|
obj->layer->evas->last_timestamp,
|
|
|
|
NULL);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2009-06-17 03:01:52 -07:00
|
|
|
EAPI Eina_Bool
|
2008-02-08 14:35:19 -08:00
|
|
|
evas_object_pass_events_get(const Evas_Object *obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
2011-11-11 22:12:42 -08:00
|
|
|
return EINA_FALSE;
|
2002-11-08 00:02:15 -08:00
|
|
|
MAGIC_CHECK_END();
|
|
|
|
return obj->pass_events;
|
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2009-06-17 03:01:52 -07:00
|
|
|
evas_object_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2010-08-23 19:55:09 -07:00
|
|
|
repeat = !!repeat;
|
|
|
|
if (obj->repeat_events == repeat) return;
|
2002-11-08 00:02:15 -08:00
|
|
|
obj->repeat_events = repeat;
|
2005-05-21 19:49:50 -07:00
|
|
|
if (evas_object_is_in_output_rect(obj,
|
2011-09-21 03:35:03 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y, 1, 1) &&
|
2007-07-23 07:22:57 -07:00
|
|
|
((!obj->precise_is_inside) ||
|
2011-09-21 03:35:03 -07:00
|
|
|
(evas_object_is_inside(obj,
|
2007-07-23 07:22:57 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y))))
|
2005-05-21 19:49:50 -07:00
|
|
|
evas_event_feed_mouse_move(obj->layer->evas,
|
2011-09-21 03:35:03 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
|
|
|
obj->layer->evas->last_timestamp,
|
|
|
|
NULL);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2009-06-17 03:01:52 -07:00
|
|
|
EAPI Eina_Bool
|
2008-02-08 14:35:19 -08:00
|
|
|
evas_object_repeat_events_get(const Evas_Object *obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
2011-11-11 22:12:42 -08:00
|
|
|
return EINA_FALSE;
|
2002-11-08 00:02:15 -08:00
|
|
|
MAGIC_CHECK_END();
|
|
|
|
return obj->repeat_events;
|
|
|
|
}
|
2005-10-29 22:07:51 -07:00
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2009-06-17 03:01:52 -07:00
|
|
|
evas_object_propagate_events_set(Evas_Object *obj, Eina_Bool prop)
|
2005-10-29 22:07:51 -07:00
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
obj->no_propagate = !prop;
|
|
|
|
}
|
|
|
|
|
2009-06-17 03:01:52 -07:00
|
|
|
EAPI Eina_Bool
|
2008-02-08 14:35:19 -08:00
|
|
|
evas_object_propagate_events_get(const Evas_Object *obj)
|
2005-10-29 22:07:51 -07:00
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
2011-11-11 22:12:42 -08:00
|
|
|
return EINA_FALSE;
|
2005-10-29 22:07:51 -07:00
|
|
|
MAGIC_CHECK_END();
|
|
|
|
return !(obj->no_propagate);
|
|
|
|
}
|
2007-07-24 07:20:07 -07:00
|
|
|
|
|
|
|
EAPI void
|
|
|
|
evas_object_pointer_mode_set(Evas_Object *obj, Evas_Object_Pointer_Mode setting)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
obj->pointer_mode = setting;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object_Pointer_Mode
|
2008-02-08 13:42:01 -08:00
|
|
|
evas_object_pointer_mode_get(const Evas_Object *obj)
|
2007-07-24 07:20:07 -07:00
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
2011-11-11 22:12:42 -08:00
|
|
|
return EVAS_OBJECT_POINTER_MODE_AUTOGRAB;
|
2007-07-24 07:20:07 -07:00
|
|
|
MAGIC_CHECK_END();
|
|
|
|
return obj->pointer_mode;
|
|
|
|
}
|
2011-07-07 06:59:50 -07:00
|
|
|
|
|
|
|
EAPI void
|
|
|
|
evas_event_refeed_event(Evas *e, void *event_copy, Evas_Callback_Type event_type)
|
|
|
|
{
|
|
|
|
switch(event_type)
|
|
|
|
{
|
|
|
|
case EVAS_CALLBACK_MOUSE_IN:
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_In *ev = event_copy;
|
|
|
|
evas_event_feed_mouse_in(e, ev->timestamp, ev->data);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EVAS_CALLBACK_MOUSE_OUT:
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Out *ev = event_copy;
|
|
|
|
evas_event_feed_mouse_out(e, ev->timestamp, ev->data);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EVAS_CALLBACK_MOUSE_DOWN:
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Down *ev = event_copy;
|
|
|
|
evas_event_feed_mouse_down(e, ev->button, ev->flags, ev-> timestamp, ev->data);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EVAS_CALLBACK_MOUSE_UP:
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Up *ev = event_copy;
|
|
|
|
evas_event_feed_mouse_up(e, ev->button, ev->flags, ev-> timestamp, ev->data);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EVAS_CALLBACK_MOUSE_MOVE:
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Move *ev = event_copy;
|
|
|
|
evas_event_feed_mouse_move(e, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp, ev->data);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EVAS_CALLBACK_MOUSE_WHEEL:
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Wheel *ev = event_copy;
|
|
|
|
evas_event_feed_mouse_wheel(e, ev->direction, ev-> z, ev->timestamp, ev->data);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EVAS_CALLBACK_MULTI_DOWN:
|
|
|
|
{
|
|
|
|
Evas_Event_Multi_Down *ev = event_copy;
|
|
|
|
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);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EVAS_CALLBACK_MULTI_UP:
|
|
|
|
{
|
|
|
|
Evas_Event_Multi_Up *ev = event_copy;
|
|
|
|
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);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EVAS_CALLBACK_MULTI_MOVE:
|
|
|
|
{
|
|
|
|
Evas_Event_Multi_Move *ev = event_copy;
|
|
|
|
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);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EVAS_CALLBACK_KEY_DOWN:
|
|
|
|
{
|
|
|
|
Evas_Event_Key_Down *ev = event_copy;
|
|
|
|
evas_event_feed_key_down(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EVAS_CALLBACK_KEY_UP:
|
|
|
|
{
|
|
|
|
Evas_Event_Key_Up *ev = event_copy;
|
|
|
|
evas_event_feed_key_up(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default: /* All non-input events are not handeled */
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|