2002-11-08 00:02:15 -08:00
|
|
|
#include "evas_common.h"
|
|
|
|
#include "evas_private.h"
|
|
|
|
|
2004-06-13 23:04:22 -07:00
|
|
|
int
|
|
|
|
evas_event_passes_through(Evas_Object *obj)
|
|
|
|
{
|
2005-07-22 03:28:11 -07:00
|
|
|
if (obj->layer->evas->events_frozen > 0) return 1;
|
2004-06-13 23:04:22 -07:00
|
|
|
if (obj->pass_events) return 1;
|
2005-07-22 03:28:11 -07:00
|
|
|
if (obj->parent_cache_valid) return obj->parent_pass_events;
|
|
|
|
if (obj->smart.parent)
|
|
|
|
{
|
|
|
|
int par_pass;
|
|
|
|
|
|
|
|
par_pass = evas_event_passes_through(obj->smart.parent);
|
|
|
|
obj->parent_cache_valid = 1;
|
|
|
|
obj->parent_pass_events = par_pass;
|
|
|
|
return par_pass;
|
|
|
|
}
|
2004-06-13 23:04:22 -07:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2005-10-26 19:44:36 -07:00
|
|
|
static Evas_List *
|
|
|
|
_evas_event_object_list_in_get(Evas *e, Evas_List *in, Evas_Object_List *list, Evas_Object *stop, int x, int y, int *no_rep)
|
|
|
|
{
|
|
|
|
Evas_Object_List *l;
|
|
|
|
|
|
|
|
if (!list) return in;
|
|
|
|
for (l = list->last; l; l = l->prev)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
|
|
|
|
|
|
|
obj = (Evas_Object *)l;
|
|
|
|
if (obj == stop)
|
|
|
|
{
|
|
|
|
*no_rep = 1;
|
|
|
|
return in;
|
|
|
|
}
|
|
|
|
if (!evas_event_passes_through(obj))
|
|
|
|
{
|
|
|
|
if ((obj->cur.visible) && (obj->delete_me == 0) &&
|
|
|
|
(!obj->clip.clipees) &&
|
|
|
|
(evas_object_clippers_is_visible(obj)))
|
|
|
|
{
|
|
|
|
if (obj->smart.smart)
|
|
|
|
{
|
|
|
|
int norep;
|
|
|
|
|
|
|
|
norep = 0;
|
|
|
|
in = _evas_event_object_list_in_get(e, in,
|
|
|
|
obj->smart.contained,
|
|
|
|
stop, x, y, &norep);
|
|
|
|
if (norep)
|
|
|
|
{
|
|
|
|
*no_rep = 1;
|
|
|
|
return in;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-07-23 07:22:57 -07:00
|
|
|
if (evas_object_is_in_output_rect(obj, x, y, 1, 1) &&
|
|
|
|
((!obj->precise_is_inside) ||
|
|
|
|
(evas_object_is_inside(obj, x, y))))
|
2005-10-26 19:44:36 -07:00
|
|
|
{
|
|
|
|
in = evas_list_append(in, obj);
|
|
|
|
if (!obj->repeat_events)
|
|
|
|
{
|
|
|
|
*no_rep = 1;
|
|
|
|
return in;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*no_rep = 0;
|
|
|
|
return in;
|
|
|
|
}
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
Evas_List *
|
|
|
|
evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y)
|
|
|
|
{
|
|
|
|
Evas_Object_List *l;
|
|
|
|
Evas_List *in = NULL;
|
|
|
|
|
|
|
|
if (!e->layers) return NULL;
|
|
|
|
for (l = ((Evas_Object_List *)(e->layers))->last; l; l = l->prev)
|
|
|
|
{
|
|
|
|
Evas_Layer *lay;
|
2005-10-26 19:44:36 -07:00
|
|
|
int norep;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
|
|
|
lay = (Evas_Layer *)l;
|
2005-10-26 19:44:36 -07:00
|
|
|
norep = 0;
|
2006-01-07 06:31:57 -08:00
|
|
|
in = _evas_event_object_list_in_get(e, in, (Evas_Object_List *)lay->objects, stop,
|
2005-10-26 19:44:36 -07:00
|
|
|
x, y, &norep);
|
|
|
|
if (norep) return in;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
return in;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_List *evas_event_list_copy(Evas_List *list);
|
|
|
|
static Evas_List *
|
|
|
|
evas_event_list_copy(Evas_List *list)
|
|
|
|
{
|
|
|
|
Evas_List *l, *new_l = NULL;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
for (l = list; l; l = l->next)
|
|
|
|
new_l = evas_list_append(new_l, l->data);
|
|
|
|
return new_l;
|
|
|
|
}
|
|
|
|
/* public functions */
|
|
|
|
|
2004-08-15 22:13:25 -07:00
|
|
|
/**
|
|
|
|
* @defgroup Evas_Event_Freezing_Group Evas Event Freezing Functions
|
|
|
|
*
|
|
|
|
* Functions that deal with the freezing of event processing of an evas.
|
|
|
|
*/
|
|
|
|
|
2003-03-04 18:30:20 -08:00
|
|
|
/**
|
2006-12-07 23:51:48 -08:00
|
|
|
* Freeze all event processing
|
2004-04-15 18:38:14 -07:00
|
|
|
* @param e The canvas to freeze event processing on
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2004-04-15 18:38:14 -07:00
|
|
|
* This function will indicate to evas that the canvas @p e is to have all
|
|
|
|
* event processing frozen until a matching evas_event_thaw() function is
|
|
|
|
* called on the same canvas. Every freeze call must be matched by a thaw call
|
|
|
|
* in order to completely thaw out a canvas.
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2004-04-15 18:38:14 -07:00
|
|
|
* Example:
|
|
|
|
* @code
|
|
|
|
* extern Evas *evas;
|
|
|
|
* extern Evas_Object *object;
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2004-04-15 18:38:14 -07:00
|
|
|
* evas_event_freeze(evas);
|
|
|
|
* evas_object_move(object, 50, 100);
|
|
|
|
* evas_object_resize(object, 200, 200);
|
|
|
|
* evas_event_thaw(evas);
|
|
|
|
* @endcode
|
2004-08-15 22:13:25 -07:00
|
|
|
* @ingroup Evas_Event_Freezing_Group
|
2003-03-04 18:30:20 -08:00
|
|
|
*/
|
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++;
|
|
|
|
}
|
|
|
|
|
2003-03-04 18:30:20 -08:00
|
|
|
/**
|
2004-04-15 18:38:14 -07:00
|
|
|
* Thaw a canvas out after freezing
|
|
|
|
* @param e The canvas to thaw out
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2004-04-15 18:38:14 -07:00
|
|
|
* This will thaw out a canvas after a matching evas_event_freeze() call. If
|
|
|
|
* this call completely thaws out a canvas, events will start being processed
|
|
|
|
* again after this call, but this call will not invole any "missed" events
|
|
|
|
* to be evaluated.
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2004-04-15 18:38:14 -07:00
|
|
|
* See evas_event_freeze() for an example.
|
2004-08-15 22:13:25 -07:00
|
|
|
* @ingroup Evas_Event_Freezing_Group
|
2003-03-04 18:30:20 -08:00
|
|
|
*/
|
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)
|
|
|
|
{
|
|
|
|
Evas_Object_List *l;
|
|
|
|
|
|
|
|
for (l = (Evas_Object_List *)e->layers; l; l = l->next)
|
|
|
|
{
|
|
|
|
Evas_Object_List *l2;
|
|
|
|
Evas_Layer *lay;
|
|
|
|
|
|
|
|
lay = (Evas_Layer *)l;
|
|
|
|
for (l2 = (Evas_Object_List *)lay->objects; l2; l2 = l2->next)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
|
|
|
|
|
|
|
obj = (Evas_Object *)l2;
|
2005-07-30 02:52:53 -07:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2003-03-04 18:30:20 -08:00
|
|
|
/**
|
2004-04-15 18:38:14 -07:00
|
|
|
* Return the freeze count of a given canvas
|
|
|
|
* @param e The canvas to fetch the freeze count from
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2004-04-15 18:38:14 -07:00
|
|
|
* This returns the number of times the canvas has been told to freeze events.
|
|
|
|
* It is possible to call evas_event_freeze() multiple times, and these must
|
|
|
|
* be matched by evas_event_thaw() calls. This call allows the program to
|
|
|
|
* discover just how many times things have been frozen in case it may want
|
|
|
|
* to break out of a deep freeze state where the count is high.
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2004-04-15 18:38:14 -07:00
|
|
|
* Example:
|
|
|
|
* @code
|
|
|
|
* extern Evas *evas;
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2004-04-15 18:38:14 -07:00
|
|
|
* while (evas_event_freeze_get(evas) > 0) evas_event_thaw(evas);
|
|
|
|
* @endcode
|
2004-08-15 22:13:25 -07:00
|
|
|
* @ingroup Evas_Event_Freezing_Group
|
2003-03-04 18:30:20 -08:00
|
|
|
*/
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI int
|
2002-11-08 00:02:15 -08:00
|
|
|
evas_event_freeze_get(Evas *e)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return 0;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
return e->events_frozen;
|
|
|
|
}
|
|
|
|
|
2003-03-04 18:30:20 -08:00
|
|
|
/**
|
|
|
|
* To be documented.
|
|
|
|
*
|
|
|
|
* FIXME: To be fixed.
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2003-03-04 18:30:20 -08: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
|
|
|
{
|
|
|
|
Evas_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();
|
|
|
|
|
|
|
|
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));
|
|
|
|
|
|
|
|
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
|
|
|
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_walk(e);
|
2002-11-08 00:02:15 -08:00
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
|
|
|
for (l = copy; l; l = l->next)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
|
|
|
Evas_Event_Mouse_Down ev;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
obj = l->data;
|
2004-09-12 20:56:39 -07:00
|
|
|
obj->mouse_grabbed++;
|
2004-09-11 21:49:07 -07:00
|
|
|
e->pointer.mouse_grabbed++;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
ev.button = b;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
2006-11-15 19:20:24 -08:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
//// ev.canvas.x = e->pointer.canvas_x;
|
|
|
|
//// ev.canvas.y = e->pointer.canvas_y;
|
2003-01-09 20:58:51 -08:00
|
|
|
ev.data = (void *)data;
|
2002-12-16 16:00:38 -08:00
|
|
|
ev.modifiers = &(e->modifiers);
|
2004-01-27 20:48:52 -08:00
|
|
|
ev.locks = &(e->locks);
|
2004-12-13 19:21:32 -08:00
|
|
|
ev.flags = flags;
|
2005-07-25 02:55:47 -07:00
|
|
|
ev.timestamp = timestamp;
|
2005-09-21 19:52:53 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2004-01-27 20:48:52 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev);
|
2007-04-29 21:22:42 -07:00
|
|
|
if (e->delete_me) break;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
if (copy) copy = evas_list_free(copy);
|
2006-08-25 13:47:32 -07:00
|
|
|
e->last_mouse_down_counter++;
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_unwalk(e);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2004-04-15 18:38:14 -07:00
|
|
|
/**
|
|
|
|
* To be documented.
|
|
|
|
*
|
|
|
|
* FIXME: To be fixed.
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2004-04-15 18:38:14 -07:00
|
|
|
*/
|
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
|
|
|
{
|
|
|
|
Evas_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));
|
|
|
|
|
|
|
|
if (e->events_frozen > 0) return;
|
2005-07-25 02:55:47 -07:00
|
|
|
e->last_timestamp = timestamp;
|
2006-05-19 00:56:53 -07:00
|
|
|
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_walk(e);
|
2002-11-08 00:02:15 -08:00
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
|
|
|
for (l = copy; l; l = l->next)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
|
|
|
Evas_Event_Mouse_Up ev;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
obj = l->data;
|
2006-04-19 07:37:49 -07:00
|
|
|
// if (obj->mouse_grabbed > 0)
|
|
|
|
obj->mouse_grabbed--;
|
|
|
|
// if (e->pointer.mouse_grabbed > 0)
|
|
|
|
e->pointer.mouse_grabbed--;
|
2002-11-08 00:02:15 -08:00
|
|
|
ev.button = b;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
2006-11-15 19:20:24 -08:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
//// ev.canvas.x = e->pointer.canvas_x;
|
|
|
|
//// ev.canvas.y = e->pointer.canvas_y;
|
2003-01-09 20:58:51 -08:00
|
|
|
ev.data = (void *)data;
|
2002-12-16 16:00:38 -08:00
|
|
|
ev.modifiers = &(e->modifiers);
|
2004-09-11 21:49:07 -07:00
|
|
|
ev.locks = &(e->locks);
|
2004-12-13 19:21:32 -08:00
|
|
|
ev.flags = flags;
|
2005-07-25 02:55:47 -07:00
|
|
|
ev.timestamp = timestamp;
|
2005-09-21 19:52:53 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2004-01-27 20:30:55 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev);
|
2007-04-29 21:22:42 -07:00
|
|
|
if (e->delete_me) break;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
if (copy) copy = evas_list_free(copy);
|
2006-08-25 13:47:32 -07:00
|
|
|
e->last_mouse_up_counter++;
|
2005-05-21 19:49:50 -07:00
|
|
|
if (!e->pointer.button)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2005-05-21 19:49:50 -07:00
|
|
|
Evas_List *ins;
|
2002-11-08 00:02:15 -08:00
|
|
|
Evas_List *l;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08: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);
|
|
|
|
for (l = copy; l; l = l->next)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
obj = l->data;
|
2004-09-17 06:46:55 -07:00
|
|
|
if ((!evas_list_find(ins, obj)) ||
|
|
|
|
(!e->pointer.inside))
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Out ev;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
obj->mouse_in = 0;
|
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
2006-11-15 19:20:24 -08:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
//// ev.canvas.x = e->pointer.canvas_x;
|
|
|
|
//// ev.canvas.y = e->pointer.canvas_y;
|
2003-01-09 20:58:51 -08:00
|
|
|
ev.data = (void *)data;
|
2002-12-16 16:00:38 -08:00
|
|
|
ev.modifiers = &(e->modifiers);
|
2005-05-21 19:49:50 -07:00
|
|
|
ev.locks = &(e->locks);
|
2005-07-25 02:55:47 -07:00
|
|
|
ev.timestamp = timestamp;
|
2005-09-21 19:52:53 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2004-01-27 20:30:55 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2007-04-29 21:22:42 -07:00
|
|
|
if (e->delete_me) break;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
if (copy) copy = evas_list_free(copy);
|
2004-09-17 06:46:55 -07:00
|
|
|
if (e->pointer.inside)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2004-09-17 06:46:55 -07:00
|
|
|
for (l = ins; l; l = l->next)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2004-09-17 06:46:55 -07:00
|
|
|
Evas_Object *obj;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2004-09-17 06:46:55 -07:00
|
|
|
obj = l->data;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2004-09-17 06:46:55 -07:00
|
|
|
if (!evas_list_find(e->pointer.object.in, obj))
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_In ev;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2004-09-17 06:46:55 -07:00
|
|
|
obj->mouse_in = 1;
|
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
2006-11-15 19:20:24 -08:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
//// ev.canvas.x = e->pointer.canvas_x;
|
|
|
|
//// ev.canvas.y = e->pointer.canvas_y;
|
2004-09-17 06:46:55 -07:00
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
2005-07-25 02:55:47 -07:00
|
|
|
ev.timestamp = timestamp;
|
2005-09-21 19:52:53 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2004-09-17 06:46:55 -07:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev);
|
|
|
|
}
|
2007-04-29 21:22:42 -07:00
|
|
|
if (e->delete_me) break;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
}
|
2004-09-17 06:46:55 -07:00
|
|
|
else
|
|
|
|
{
|
|
|
|
ins = evas_list_free(ins);
|
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
/* free our old list of ins */
|
|
|
|
e->pointer.object.in = evas_list_free(e->pointer.object.in);
|
|
|
|
/* and set up the new one */
|
|
|
|
e->pointer.object.in = ins;
|
2004-09-17 06:46:55 -07:00
|
|
|
if (e->pointer.inside)
|
2005-07-25 02:55:47 -07:00
|
|
|
evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, timestamp, data);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2006-05-19 00:56:53 -07:00
|
|
|
if ((e->pointer.button == 0) && (e->pointer.mouse_grabbed))
|
|
|
|
{
|
|
|
|
e->pointer.mouse_grabbed = 0;
|
|
|
|
}
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_unwalk(e);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2003-03-04 18:30:20 -08:00
|
|
|
/**
|
|
|
|
* To be documented.
|
|
|
|
*
|
|
|
|
* FIXME: To be fixed.
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2003-03-04 18:30:20 -08:00
|
|
|
*/
|
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
|
|
|
{
|
|
|
|
Evas_List *l, *copy;
|
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
|
|
|
|
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);
|
2005-09-21 19:52:53 -07:00
|
|
|
|
2004-12-13 19:21:32 -08:00
|
|
|
for (l = copy; l; l = l->next)
|
2005-09-21 19:52:53 -07:00
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Wheel ev;
|
|
|
|
Evas_Object *obj = l->data;
|
|
|
|
|
|
|
|
ev.direction = direction;
|
|
|
|
ev.z = z;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
2006-11-15 19:20:24 -08:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
//// ev.canvas.x = e->pointer.canvas_x;
|
|
|
|
//// ev.canvas.y = e->pointer.canvas_y;
|
2005-09-21 19:52:53 -07:00
|
|
|
ev.data = (void *) data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
|
|
|
ev.timestamp = timestamp;
|
|
|
|
if (e->events_frozen <= 0)
|
2004-12-13 19:21:32 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev);
|
2007-04-29 21:22:42 -07:00
|
|
|
if (e->delete_me) break;
|
2005-09-21 19:52:53 -07:00
|
|
|
}
|
2005-01-30 03:41:01 -08:00
|
|
|
if (copy) copy = evas_list_free(copy);
|
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
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* To be documented.
|
|
|
|
*
|
|
|
|
* FIXME: To be fixed.
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
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);
|
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
|
|
|
{
|
|
|
|
/* go thru old list of in objects */
|
|
|
|
Evas_List *outs = NULL;
|
|
|
|
Evas_List *l, *copy;
|
2004-09-11 21:49:07 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
|
|
|
for (l = copy; l; l = l->next)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
obj = l->data;
|
|
|
|
if ((obj->cur.visible) &&
|
|
|
|
(evas_object_clippers_is_visible(obj)) &&
|
2004-06-13 23:04:22 -07:00
|
|
|
(!evas_event_passes_through(obj)) &&
|
2002-11-08 00:02:15 -08:00
|
|
|
(!obj->clip.clipees))
|
|
|
|
{
|
|
|
|
if ((px != x) || (py != y))
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Move ev;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.cur.output.x = e->pointer.x;
|
|
|
|
ev.cur.output.y = e->pointer.y;
|
2006-11-15 19:20:24 -08:00
|
|
|
ev.cur.canvas.x = e->pointer.x;
|
|
|
|
ev.cur.canvas.y = e->pointer.y;
|
|
|
|
//// ev.cur.canvas.x = e->pointer.canvas_x;
|
|
|
|
//// ev.cur.canvas.y = e->pointer.canvas_y;
|
2002-11-08 00:02:15 -08:00
|
|
|
ev.prev.output.x = px;
|
|
|
|
ev.prev.output.y = py;
|
2006-11-15 19:20:24 -08:00
|
|
|
ev.prev.canvas.x = px;
|
|
|
|
ev.prev.canvas.y = py;
|
|
|
|
//// ev.prev.canvas.x = pcx;
|
|
|
|
//// ev.prev.canvas.y = pcy;
|
2003-01-09 20:58:51 -08:00
|
|
|
ev.data = (void *)data;
|
2002-12-16 16:00:38 -08:00
|
|
|
ev.modifiers = &(e->modifiers);
|
2004-09-21 02:33:18 -07:00
|
|
|
ev.locks = &(e->locks);
|
2005-07-25 02:55:47 -07:00
|
|
|
ev.timestamp = timestamp;
|
2005-09-21 19:52:53 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2004-01-27 20:30:55 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
outs = evas_list_append(outs, obj);
|
2007-04-29 21:22:42 -07:00
|
|
|
if (e->delete_me) break;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
if (copy) copy = evas_list_free(copy);
|
|
|
|
while (outs)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
obj = outs->data;
|
|
|
|
outs = evas_list_remove(outs, obj);
|
2007-04-29 21:22:42 -07:00
|
|
|
if ((!obj->mouse_grabbed) && (!e->delete_me))
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2005-01-19 22:54:45 -08:00
|
|
|
e->pointer.object.in = evas_list_remove(e->pointer.object.in, obj);
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Out ev;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2005-01-19 22:54:45 -08:00
|
|
|
obj->mouse_in = 0;
|
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
2006-11-15 19:20:24 -08:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
//// ev.canvas.x = e->pointer.canvas_x;
|
|
|
|
//// ev.canvas.y = e->pointer.canvas_y;
|
2005-01-19 22:54:45 -08:00
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
2005-07-25 02:55:47 -07:00
|
|
|
ev.timestamp = timestamp;
|
2005-09-21 19:52:53 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2005-01-19 22:54:45 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev);
|
2005-05-21 19:49:50 -07:00
|
|
|
}
|
2005-01-19 22:54:45 -08:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Evas_List *ins;
|
|
|
|
Evas_List *l, *copy;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08: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);
|
|
|
|
for (l = copy; l; l = l->next)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
obj = l->data;
|
|
|
|
/* if its under the pointer and its visible and its in the new */
|
|
|
|
/* in list */
|
2005-05-21 19:49:50 -07:00
|
|
|
// FIXME: i don't think we need this
|
2005-04-03 07:22:17 -07:00
|
|
|
// evas_object_clip_recalc(obj);
|
2005-05-21 19:49:50 -07:00
|
|
|
if (evas_object_is_in_output_rect(obj, x, y, 1, 1) &&
|
2002-11-08 00:02:15 -08:00
|
|
|
(obj->cur.visible) &&
|
|
|
|
(evas_object_clippers_is_visible(obj)) &&
|
|
|
|
(evas_list_find(ins, obj)) &&
|
2004-06-13 23:04:22 -07:00
|
|
|
(!evas_event_passes_through(obj)) &&
|
2007-07-23 07:22:57 -07:00
|
|
|
(!obj->clip.clipees) &&
|
|
|
|
((!obj->precise_is_inside) ||
|
|
|
|
(evas_object_is_inside(obj, x, y))))
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
|
|
|
if ((px != x) || (py != y))
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Move ev;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.cur.output.x = e->pointer.x;
|
|
|
|
ev.cur.output.y = e->pointer.y;
|
2006-11-15 19:20:24 -08:00
|
|
|
ev.cur.canvas.x = e->pointer.x;
|
|
|
|
ev.cur.canvas.y = e->pointer.y;
|
|
|
|
//// ev.cur.canvas.x = e->pointer.canvas_x;
|
|
|
|
//// ev.cur.canvas.y = e->pointer.canvas_y;
|
2002-11-08 00:02:15 -08:00
|
|
|
ev.prev.output.x = px;
|
|
|
|
ev.prev.output.y = py;
|
2006-11-15 19:20:24 -08:00
|
|
|
ev.prev.canvas.x = px;
|
|
|
|
ev.prev.canvas.y = py;
|
|
|
|
//// ev.prev.canvas.x = pcx;
|
|
|
|
//// ev.prev.canvas.y = pcy;
|
2003-01-09 20:58:51 -08:00
|
|
|
ev.data = (void *)data;
|
2002-12-16 16:00:38 -08:00
|
|
|
ev.modifiers = &(e->modifiers);
|
2005-05-21 19:49:50 -07:00
|
|
|
ev.locks = &(e->locks);
|
2005-07-25 02:55:47 -07:00
|
|
|
ev.timestamp = timestamp;
|
2005-09-21 19:52:53 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2004-01-27 20:30:55 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/* otherwise it has left the object */
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Out ev;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
obj->mouse_in = 0;
|
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
2006-11-15 19:20:24 -08:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
//// ev.canvas.x = e->pointer.canvas_x;
|
|
|
|
//// ev.canvas.y = e->pointer.canvas_y;
|
2003-01-09 20:58:51 -08:00
|
|
|
ev.data = (void *)data;
|
2002-12-16 16:00:38 -08:00
|
|
|
ev.modifiers = &(e->modifiers);
|
2005-05-21 19:49:50 -07:00
|
|
|
ev.locks = &(e->locks);
|
2005-07-25 02:55:47 -07:00
|
|
|
ev.timestamp = timestamp;
|
2005-09-21 19:52:53 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2004-01-27 20:30:55 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2007-04-29 21:22:42 -07:00
|
|
|
if (e->delete_me) break;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
if (copy) copy = evas_list_free(copy);
|
2004-02-16 11:22:48 -08:00
|
|
|
/* go thru our current list of ins */
|
2002-11-08 00:02:15 -08:00
|
|
|
for (l = ins; l; l = l->next)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
obj = l->data;
|
|
|
|
/* if its not in the old list of ins send an enter event */
|
|
|
|
if (!evas_list_find(e->pointer.object.in, obj))
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_In ev;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
obj->mouse_in = 1;
|
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
2006-11-15 19:20:24 -08:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
//// ev.canvas.x = e->pointer.canvas_x;
|
|
|
|
//// ev.canvas.y = e->pointer.canvas_y;
|
2003-01-09 20:58:51 -08:00
|
|
|
ev.data = (void *)data;
|
2002-12-16 16:00:38 -08:00
|
|
|
ev.modifiers = &(e->modifiers);
|
2005-05-21 19:49:50 -07:00
|
|
|
ev.locks = &(e->locks);
|
2005-07-25 02:55:47 -07:00
|
|
|
ev.timestamp = timestamp;
|
2005-09-21 19:52:53 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2004-01-27 20:30:55 -08:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2007-04-29 21:22:42 -07:00
|
|
|
if (e->delete_me) break;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
/* free our old list of ins */
|
2004-02-16 11:22:48 -08:00
|
|
|
evas_list_free(e->pointer.object.in);
|
2002-11-08 00:02:15 -08:00
|
|
|
/* and set up the new one */
|
|
|
|
e->pointer.object.in = ins;
|
|
|
|
}
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_unwalk(e);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2003-03-04 18:30:20 -08:00
|
|
|
/**
|
|
|
|
* To be documented.
|
|
|
|
*
|
|
|
|
* FIXME: To be fixed.
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2003-03-04 18:30:20 -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
|
|
|
{
|
2005-05-21 19:49:50 -07:00
|
|
|
Evas_List *ins;
|
2004-09-17 06:46:55 -07:00
|
|
|
Evas_List *l;
|
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
|
|
|
|
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);
|
|
|
|
for (l = ins; l; l = l->next)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2004-09-17 06:46:55 -07:00
|
|
|
obj = l->data;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2004-09-17 06:46:55 -07:00
|
|
|
if (!evas_list_find(e->pointer.object.in, obj))
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_In ev;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2004-09-17 06:46:55 -07:00
|
|
|
obj->mouse_in = 1;
|
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
2006-11-15 19:20:24 -08:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
//// ev.canvas.x = e->pointer.canvas_x;
|
|
|
|
//// ev.canvas.y = e->pointer.canvas_y;
|
2004-09-17 06:46:55 -07:00
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
2005-07-25 02:55:47 -07:00
|
|
|
ev.timestamp = timestamp;
|
2005-09-21 19:52:53 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2004-09-17 06:46:55 -07:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev);
|
|
|
|
}
|
2007-04-29 21:22:42 -07:00
|
|
|
if (e->delete_me) break;
|
2004-09-17 06:46:55 -07:00
|
|
|
}
|
|
|
|
/* free our old list of ins */
|
|
|
|
e->pointer.object.in = evas_list_free(e->pointer.object.in);
|
|
|
|
/* and set up the new one */
|
|
|
|
e->pointer.object.in = ins;
|
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
|
|
|
}
|
|
|
|
|
2003-03-04 18:30:20 -08:00
|
|
|
/**
|
|
|
|
* To be documented.
|
|
|
|
*
|
|
|
|
* FIXME: To be fixed.
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2003-03-04 18:30:20 -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
|
|
|
{
|
|
|
|
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
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
/* go thru old list of in objects */
|
|
|
|
Evas_List *l, *copy;
|
|
|
|
|
|
|
|
copy = evas_event_list_copy(e->pointer.object.in);
|
|
|
|
for (l = copy; l; l = l->next)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2004-09-17 06:46:55 -07:00
|
|
|
obj = l->data;
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Out ev;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2004-09-17 06:46:55 -07:00
|
|
|
obj->mouse_in = 0;
|
|
|
|
ev.buttons = e->pointer.button;
|
|
|
|
ev.output.x = e->pointer.x;
|
|
|
|
ev.output.y = e->pointer.y;
|
2006-11-15 19:20:24 -08:00
|
|
|
ev.canvas.x = e->pointer.x;
|
|
|
|
ev.canvas.y = e->pointer.y;
|
|
|
|
//// ev.canvas.x = e->pointer.canvas_x;
|
|
|
|
//// ev.canvas.y = e->pointer.canvas_y;
|
2004-09-17 06:46:55 -07:00
|
|
|
ev.data = (void *)data;
|
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
2005-07-25 02:55:47 -07:00
|
|
|
ev.timestamp = timestamp;
|
2005-09-21 19:52:53 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2004-09-17 06:46:55 -07:00
|
|
|
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev);
|
|
|
|
}
|
2007-04-29 21:22:42 -07:00
|
|
|
if (e->delete_me) break;
|
2004-09-17 06:46:55 -07:00
|
|
|
}
|
2005-01-30 03:41:01 -08:00
|
|
|
if (copy) copy = evas_list_free(copy);
|
2004-09-21 02:33:18 -07:00
|
|
|
/* free our old list of ins */
|
|
|
|
e->pointer.object.in = evas_list_free(e->pointer.object.in);
|
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
|
|
|
}
|
|
|
|
|
2003-03-04 18:30:20 -08:00
|
|
|
/**
|
|
|
|
* To be documented.
|
|
|
|
*
|
|
|
|
* FIXME: To be fixed.
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2003-03-04 18:30:20 -08:00
|
|
|
*/
|
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
|
|
|
{
|
|
|
|
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);
|
2002-12-16 16:00:38 -08:00
|
|
|
{
|
|
|
|
Evas_Event_Key_Down ev;
|
2003-07-07 23:08:26 -07:00
|
|
|
int exclusive;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2003-07-07 23:08:26 -07:00
|
|
|
exclusive = 0;
|
2003-01-09 20:58:51 -08:00
|
|
|
ev.keyname = (char *)keyname;
|
|
|
|
ev.data = (void *)data;
|
2002-12-16 16:00:38 -08:00
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
2004-12-13 19:21:32 -08:00
|
|
|
ev.key = key;
|
|
|
|
ev.string = string;
|
|
|
|
ev.compose = compose;
|
2005-07-25 02:55:47 -07:00
|
|
|
ev.timestamp = timestamp;
|
2003-01-05 04:55:37 -08:00
|
|
|
if (e->grabs)
|
|
|
|
{
|
|
|
|
Evas_List *l;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2003-07-07 23:08:26 -07:00
|
|
|
e->walking_grabs++;
|
2003-01-05 04:55:37 -08:00
|
|
|
for (l = e->grabs; l; l= l->next)
|
|
|
|
{
|
|
|
|
Evas_Key_Grab *g;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2003-01-05 04:55:37 -08:00
|
|
|
g = l->data;
|
2003-07-07 23:08:26 -07:00
|
|
|
if (g->just_added)
|
|
|
|
{
|
|
|
|
g->just_added = 0;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (g->delete_me) continue;
|
2003-01-19 21:17:21 -08:00
|
|
|
if (((e->modifiers.mask & g->modifiers) ||
|
|
|
|
(g->modifiers == e->modifiers.mask)) &&
|
2003-01-05 04:55:37 -08:00
|
|
|
(!strcmp(keyname, g->keyname)))
|
|
|
|
{
|
2005-09-24 03:22:55 -07:00
|
|
|
if (!(e->modifiers.mask & g->not_modifiers))
|
|
|
|
{
|
|
|
|
if (e->events_frozen <= 0)
|
|
|
|
evas_object_event_callback_call(g->object, EVAS_CALLBACK_KEY_DOWN, &ev);
|
|
|
|
if (g->exclusive) exclusive = 1;
|
|
|
|
}
|
2003-07-07 23:08:26 -07:00
|
|
|
}
|
2007-04-29 21:22:42 -07:00
|
|
|
if (e->delete_me) break;
|
2003-07-07 23:08:26 -07:00
|
|
|
}
|
|
|
|
e->walking_grabs--;
|
|
|
|
if (e->walking_grabs <= 0)
|
|
|
|
{
|
|
|
|
while (e->delete_grabs > 0)
|
|
|
|
{
|
|
|
|
Evas_List *l;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2003-07-07 23:08:26 -07:00
|
|
|
e->delete_grabs--;
|
2003-07-16 00:39:28 -07:00
|
|
|
for (l = e->grabs; l;)
|
2003-07-07 23:08:26 -07:00
|
|
|
{
|
|
|
|
Evas_Key_Grab *g;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2003-07-07 23:08:26 -07:00
|
|
|
g = l->data;
|
2003-07-16 00:39:28 -07:00
|
|
|
l = l->next;
|
2003-07-07 23:08:26 -07:00
|
|
|
if (g->delete_me)
|
2003-07-16 00:39:28 -07:00
|
|
|
evas_key_grab_free(g->object, g->keyname, g->modifiers, g->not_modifiers);
|
2003-07-07 23:08:26 -07:00
|
|
|
}
|
|
|
|
}
|
2003-01-05 04:55:37 -08:00
|
|
|
}
|
|
|
|
}
|
2003-07-07 23:08:26 -07:00
|
|
|
if ((e->focused) && (!exclusive))
|
2003-01-29 15:37:10 -08:00
|
|
|
{
|
2005-09-21 19:52:53 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2004-01-27 20:30:55 -08:00
|
|
|
evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_DOWN, &ev);
|
2003-01-29 15:37:10 -08:00
|
|
|
}
|
2003-01-05 04:55:37 -08:00
|
|
|
}
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_unwalk(e);
|
2002-12-16 16:00:38 -08:00
|
|
|
}
|
|
|
|
|
2003-03-04 18:30:20 -08:00
|
|
|
/**
|
|
|
|
* To be documented.
|
|
|
|
*
|
|
|
|
* FIXME: To be fixed.
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2003-03-04 18:30:20 -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
|
|
|
{
|
|
|
|
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);
|
2002-12-16 16:00:38 -08:00
|
|
|
{
|
|
|
|
Evas_Event_Key_Up ev;
|
2003-07-07 23:08:26 -07:00
|
|
|
int exclusive;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
|
|
|
exclusive = 0;
|
2003-01-09 20:58:51 -08:00
|
|
|
ev.keyname = (char *)keyname;
|
|
|
|
ev.data = (void *)data;
|
2002-12-16 16:00:38 -08:00
|
|
|
ev.modifiers = &(e->modifiers);
|
|
|
|
ev.locks = &(e->locks);
|
2004-12-13 19:21:32 -08:00
|
|
|
ev.key = key;
|
|
|
|
ev.string = string;
|
|
|
|
ev.compose = compose;
|
2005-07-25 02:55:47 -07:00
|
|
|
ev.timestamp = timestamp;
|
2003-01-05 04:55:37 -08:00
|
|
|
if (e->grabs)
|
|
|
|
{
|
|
|
|
Evas_List *l;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2003-07-07 23:08:26 -07:00
|
|
|
e->walking_grabs++;
|
2003-01-05 04:55:37 -08:00
|
|
|
for (l = e->grabs; l; l= l->next)
|
|
|
|
{
|
|
|
|
Evas_Key_Grab *g;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2003-01-05 04:55:37 -08:00
|
|
|
g = l->data;
|
2003-07-07 23:08:26 -07:00
|
|
|
if (g->just_added)
|
|
|
|
{
|
|
|
|
g->just_added = 0;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (g->delete_me) continue;
|
2003-01-19 21:17:21 -08:00
|
|
|
if (((e->modifiers.mask & g->modifiers) ||
|
|
|
|
(g->modifiers == e->modifiers.mask)) &&
|
|
|
|
(!((e->modifiers.mask & g->not_modifiers) ||
|
|
|
|
(g->not_modifiers == ~e->modifiers.mask))) &&
|
2003-01-05 04:55:37 -08:00
|
|
|
(!strcmp(keyname, g->keyname)))
|
|
|
|
{
|
2005-09-21 19:52:53 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2004-01-27 20:30:55 -08:00
|
|
|
evas_object_event_callback_call(g->object, EVAS_CALLBACK_KEY_UP, &ev);
|
2003-07-07 23:08:26 -07:00
|
|
|
if (g->exclusive) exclusive = 1;
|
2005-05-21 19:49:50 -07:00
|
|
|
}
|
2007-04-29 21:22:42 -07:00
|
|
|
if (e->delete_me) break;
|
2003-01-05 04:55:37 -08:00
|
|
|
}
|
2003-07-07 23:08:26 -07:00
|
|
|
e->walking_grabs--;
|
|
|
|
if (e->walking_grabs <= 0)
|
|
|
|
{
|
|
|
|
while (e->delete_grabs > 0)
|
|
|
|
{
|
|
|
|
Evas_List *l;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2003-07-07 23:08:26 -07:00
|
|
|
e->delete_grabs--;
|
|
|
|
for (l = e->grabs; l; l= l->next)
|
|
|
|
{
|
|
|
|
Evas_Key_Grab *g;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2003-07-07 23:08:26 -07:00
|
|
|
g = l->data;
|
2003-07-16 00:39:28 -07:00
|
|
|
l = l->next;
|
2003-07-07 23:08:26 -07:00
|
|
|
if (g->delete_me)
|
2003-07-16 00:39:28 -07:00
|
|
|
evas_key_grab_free(g->object, g->keyname, g->modifiers, g->not_modifiers);
|
2003-07-07 23:08:26 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2003-01-05 04:55:37 -08:00
|
|
|
}
|
2003-07-07 23:08:26 -07:00
|
|
|
if ((e->focused) && (!exclusive))
|
2003-01-29 15:37:10 -08:00
|
|
|
{
|
2005-09-21 19:52:53 -07:00
|
|
|
if (e->events_frozen <= 0)
|
2004-01-27 20:30:55 -08:00
|
|
|
evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_UP, &ev);
|
2003-01-29 15:37:10 -08:00
|
|
|
}
|
2003-01-05 04:55:37 -08:00
|
|
|
}
|
2007-04-29 21:22:42 -07:00
|
|
|
_evas_unwalk(e);
|
2002-12-16 16:00:38 -08:00
|
|
|
}
|
|
|
|
|
2003-03-04 18:30:20 -08:00
|
|
|
/**
|
2006-12-07 23:51:48 -08:00
|
|
|
* @defgroup Evas_Object_Event_Flags_Group Evas Object Event Flag Functions
|
2003-03-04 18:30:20 -08:00
|
|
|
*
|
2006-12-07 23:51:48 -08:00
|
|
|
* Functions that deal with how events on an Evas Object are processed.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set an object's pass events state.
|
|
|
|
* @param obj the evas object
|
|
|
|
* @param pass whether to pass events or not
|
|
|
|
*
|
|
|
|
* If @p pass is true, this will cause events on @p obj to be ignored.
|
|
|
|
* They will be triggered on the next lower object (that is not set to
|
|
|
|
* pass events) instead.
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2006-12-07 23:51:48 -08:00
|
|
|
* If @p pass is false, events will be processed as normal.
|
|
|
|
*
|
|
|
|
* @ingroup Evas_Object_Event_Flags_Group
|
2003-03-04 18:30:20 -08:00
|
|
|
*/
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2003-10-17 20:34:00 -07:00
|
|
|
evas_object_pass_events_set(Evas_Object *obj, Evas_Bool pass)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
obj->pass_events = pass;
|
2005-07-22 03:28:11 -07:00
|
|
|
evas_object_smart_member_cache_invalidate(obj);
|
2005-05-21 19:49:50 -07:00
|
|
|
if (evas_object_is_in_output_rect(obj,
|
|
|
|
obj->layer->evas->pointer.x,
|
2007-07-23 07:22:57 -07:00
|
|
|
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))))
|
2005-05-21 19:49:50 -07:00
|
|
|
evas_event_feed_mouse_move(obj->layer->evas,
|
|
|
|
obj->layer->evas->pointer.x,
|
2004-12-13 19:21:32 -08:00
|
|
|
obj->layer->evas->pointer.y,
|
2005-07-25 02:55:47 -07:00
|
|
|
obj->layer->evas->last_timestamp,
|
2004-12-13 19:21:32 -08:00
|
|
|
NULL);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2003-03-04 18:30:20 -08:00
|
|
|
/**
|
2006-12-07 23:51:48 -08:00
|
|
|
* Determine whether an object is set to pass events.
|
|
|
|
* @param obj
|
|
|
|
* @return pass events state
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2006-12-07 23:51:48 -08:00
|
|
|
* @ingroup Evas_Object_Event_Flags_Group
|
2003-03-04 18:30:20 -08:00
|
|
|
*/
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI Evas_Bool
|
2002-11-08 00:02:15 -08:00
|
|
|
evas_object_pass_events_get(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
|
|
|
return 0;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
return obj->pass_events;
|
|
|
|
}
|
|
|
|
|
2003-03-04 18:30:20 -08:00
|
|
|
/**
|
2006-12-07 23:51:48 -08:00
|
|
|
* Set an object's repeat events state.
|
|
|
|
* @param obj the object
|
|
|
|
* @param repeat wheter to repeat events or not
|
2003-03-04 18:30:20 -08:00
|
|
|
*
|
2006-12-07 23:51:48 -08:00
|
|
|
* If @p repeat is true, this will cause events on @p obj to trigger
|
|
|
|
* callbacks, but also to be repeated on the next lower object in the
|
|
|
|
* stack.
|
|
|
|
*
|
|
|
|
* If @p repeat is false, events occuring on @p obj will be processed
|
|
|
|
* normally.
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2006-12-07 23:51:48 -08:00
|
|
|
* @ingroup Evas_Object_Event_Flags_Group
|
2003-03-04 18:30:20 -08:00
|
|
|
*/
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2003-10-17 20:34:00 -07:00
|
|
|
evas_object_repeat_events_set(Evas_Object *obj, Evas_Bool repeat)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
obj->repeat_events = repeat;
|
2005-05-21 19:49:50 -07:00
|
|
|
if (evas_object_is_in_output_rect(obj,
|
|
|
|
obj->layer->evas->pointer.x,
|
2007-07-23 07:22:57 -07:00
|
|
|
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))))
|
2005-05-21 19:49:50 -07:00
|
|
|
evas_event_feed_mouse_move(obj->layer->evas,
|
2004-12-13 19:21:32 -08:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
2005-07-25 02:55:47 -07:00
|
|
|
obj->layer->evas->last_timestamp,
|
2004-12-13 19:21:32 -08:00
|
|
|
NULL);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2003-03-04 18:30:20 -08:00
|
|
|
/**
|
2006-12-07 23:51:48 -08:00
|
|
|
* Determine whether an object is set to repeat events.
|
|
|
|
* @param obj
|
|
|
|
* @return repeat events state
|
2005-05-21 19:49:50 -07:00
|
|
|
*
|
2006-12-07 23:51:48 -08:00
|
|
|
* @ingroup Evas_Object_Event_Flags_Group
|
2003-03-04 18:30:20 -08:00
|
|
|
*/
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI Evas_Bool
|
2002-11-08 00:02:15 -08:00
|
|
|
evas_object_repeat_events_get(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
|
|
|
return 0;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
return obj->repeat_events;
|
|
|
|
}
|
2005-10-29 22:07:51 -07:00
|
|
|
|
|
|
|
/**
|
2006-12-07 23:51:48 -08:00
|
|
|
* Set whether events on a smart member object should propagate to its parent.
|
2005-10-29 22:07:51 -07:00
|
|
|
*
|
2006-12-07 23:51:48 -08:00
|
|
|
* @param obj the smart member object
|
|
|
|
* @param prop wheter to propagate events or not
|
|
|
|
*
|
|
|
|
* This function has no effect if @p obj is not a member of a smart
|
|
|
|
* object.
|
2005-10-29 22:07:51 -07:00
|
|
|
*
|
2006-12-07 23:51:48 -08:00
|
|
|
* If @p prop is true, events occuring on this object will propagate on
|
|
|
|
* to the smart object of which @p obj is a member.
|
|
|
|
*
|
|
|
|
* If @p prop is false, events for which callbacks are set on the member
|
|
|
|
* object, @p obj, will not be passed on to the parent smart object.
|
|
|
|
*
|
|
|
|
* The default value is true.
|
|
|
|
* @ingroup Evas_Object_Event_Flags_Group
|
2005-10-29 22:07:51 -07:00
|
|
|
*/
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2005-10-29 22:07:51 -07:00
|
|
|
evas_object_propagate_events_set(Evas_Object *obj, Evas_Bool prop)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
obj->no_propagate = !prop;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2006-12-07 23:51:48 -08:00
|
|
|
* Determine whether an object is set to propagate events.
|
|
|
|
* @param obj
|
|
|
|
* @return propogate events state
|
2005-10-29 22:07:51 -07:00
|
|
|
*
|
2006-12-07 23:51:48 -08:00
|
|
|
* @ingroup Evas_Object_Event_Flags_Group
|
2005-10-29 22:07:51 -07:00
|
|
|
*/
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI Evas_Bool
|
2005-10-29 22:07:51 -07:00
|
|
|
evas_object_propagate_events_get(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
|
|
|
return 0;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
return !(obj->no_propagate);
|
|
|
|
}
|