HI, Daniel.
Yeh i missed since 1.8 for eos. will added it. But I didn't forget Vincent. I will update NEWS and Changes soon when features are completed. ------------------------------------ -Regards, Hermet- -----Original Message----- From: "daniel.za...@samsung.com"<daniel.za...@samsung.com> To: <enlightenment-devel@lists.sourceforge.net>; Cc: Sent: 2012-10-23 (화) 17:47:15 Subject: Re: [E-devel] E SVN: hermet IN trunk/evas/src/lib: . canvas include Hermet, you have to revert ... you forgot the @since 1.8 for the Eo defines and Vincent will kill you ;-) On 10/23/2012 10:44 AM, Enlightenment SVN wrote: > Log: > evas/proxy - added 2 more apis. not enough yet. will fix them soon. > > evas_object_image_source_events_set/get > > > > Author: hermet > Date: 2012-10-23 01:44:11 -0700 (Tue, 23 Oct 2012) > New Revision: 78361 > Trac: http://trac.enlightenment.org/e/changeset/78361 > > Modified: > trunk/evas/src/lib/Evas.h trunk/evas/src/lib/canvas/evas_events.c trunk/evas/src/lib/canvas/evas_object_image.c trunk/evas/src/lib/include/evas_private.h > > Modified: trunk/evas/src/lib/Evas.h > =================================================================== > --- trunk/evas/src/lib/Evas.h 2012-10-23 07:25:29 UTC (rev 78360) > +++ trunk/evas/src/lib/Evas.h 2012-10-23 08:44:11 UTC (rev 78361) > @@ -9160,6 +9160,44 @@ > EAPI Eina_Bool evas_object_image_source_visible_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); > > /** > + * Set whether an Evas object is to source events. > + * > + * @param obj Proxy (image) object. > + * @param source whether @p obj is to pass events (@c EINA_TRUE) or not > + * (@c EINA_FALSE) > + * > + * Set whether an Evas object is to repeat events to source. > + * > + * If @p source is @c EINA_TRUE, it will make events on @p obj to also be > + * repeated for the source object (see evas_object_image_source_set()). Even the > + * @p obj and source geometries are different, the event position will be > + * transformed to the source object's space. > + * > + * If @p source is @c EINA_FALSE, events occurring on @p obj will be > + * processed only on it. > + * > + * @see evas_object_image_source_get() > + * @see evas_object_image_source_visible_set() > + * @see evas_object_source_events_set() > + * @since 1.8 > + */ > +EAPI void evas_object_image_source_events_set(Evas_Object *obj, Eina_Bool source) EINA_ARG_NONNULL(1); > + > +/** > + * Determine whether an object is set to source events. > + * > + * @param obj Proxy (image) object. > + * @return source whether @p obj is set to source events (@c EINA_TRUE) or not > + * (@c EINA_FALSE) > + * > + * @see evas_object_image_source_set() > + * @see evas_object_image_source_visible_set() > + * @see evas_object_source_events_set() > + * @since 1.8 > + */ > +EAPI Eina_Bool evas_object_image_source_events_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); > + > +/** > * Check if a file extension may be supported by @ref Evas_Object_Image. > * > * @param file The file to check > @@ -18047,6 +18085,8 @@ > EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_SET, > EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_SET, > EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_GET, > + EVAS_OBJ_IMAGE_SUB_ID_SOURCE_EVENTS_SET, > + EVAS_OBJ_IMAGE_SUB_ID_SOURCE_EVENTS_GET, > EVAS_OBJ_IMAGE_SUB_ID_LAST > }; > > @@ -18151,6 +18191,28 @@ > #define evas_obj_image_source_visible_get(visible) EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_GET), EO_TYPECHECK(Eina_Bool *, visible) > > /** > + * @def evas_obj_image_source_events_set > + * > + * Set events to be repeated to the source object. > + * > + * @param[in] source in > + * > + * @see evas_object_image_source_events_get > + */ > +#define evas_obj_image_source_events_set(source) EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_EVENTS_SET), EO_TYPECHECK(Eina_Bool, source) > + > +/** > + * @def evas_obj_image_source_events_get > + * > + * Get the state of the source event. > + * > + * @param[out] source out > + * > + * @see evas_obj_image_source_event_set > + */ > +#define evas_obj_image_source_events_get(source) EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_EVENTS_GET), EO_TYPECHECK(Eina_Bool *, source) > + > +/** > * @def evas_obj_image_border_set > * @since 1.8 > * > > Modified: trunk/evas/src/lib/canvas/evas_events.c > =================================================================== > --- trunk/evas/src/lib/canvas/evas_events.c 2012-10-23 07:25:29 UTC (rev 78360) > +++ trunk/evas/src/lib/canvas/evas_events.c 2012-10-23 08:44:11 UTC (rev 78361) > @@ -4,7 +4,7 @@ > static Eina_List * > _evas_event_object_list_in_get(Evas *eo_e, Eina_List *in, > const Eina_Inlist *list, Evas_Object *stop, > - int x, int y, int *no_rep); > + int x, int y, int *no_rep, Eina_Bool source); > > static void > _evas_event_havemap_adjust(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *x, Evas_Coord *y, Eina_Bool mouse_grabbed) > @@ -42,7 +42,7 @@ > static Eina_List * > _evas_event_object_list_raw_in_get(Evas *eo_e, Eina_List *in, > const Eina_Inlist *list, Evas_Object *stop, > - int x, int y, int *no_rep) > + int x, int y, int *no_rep, Eina_Bool source) > { > Evas_Object *eo_obj; > Evas_Object_Protected_Data *obj; > @@ -59,12 +59,15 @@ > *no_rep = 1; > return in; > } > - if (evas_event_passes_through(eo_obj, obj)) continue; > - if (evas_object_is_source_invisible(eo_obj, obj)) continue; > - if ((obj->cur.visible) && (obj->delete_me == 0) && > - (!obj->clip.clipees) && > - (evas_object_clippers_is_visible(eo_obj, obj))) > + if (!source) > { > + if (evas_event_passes_through(eo_obj, obj)) continue; > + if (evas_object_is_source_invisible(eo_obj, obj)) continue; > + } > + if ((obj->delete_me == 0) && > + ((source) || ((obj->cur.visible) && (!obj->clip.clipees) && > + evas_object_clippers_is_visible(eo_obj, obj)))) > + { > if (obj->is_smart) > { > int norep = 0; > @@ -89,7 +92,7 @@ > stop, > obj->cur.geometry.x + obj->cur.map->mx, > obj->cur.geometry.y + obj->cur.map->my, > - &norep); > + &norep, source); > } > } > } > @@ -108,7 +111,7 @@ > obj->cur.geometry.y + obj->cur.geometry.h >= y)) > in = _evas_event_object_list_in_get > (eo_e, in, evas_object_smart_members_get_direct(eo_obj), > - stop, x, y, &norep); > + stop, x, y, &norep, source); > } > if (norep) > { > @@ -154,14 +157,61 @@ > return in; > } > > +static void > +_evas_object_source_event(Evas_Object *eo_obj, Evas *eo_e, Evas_Callback_Type type, void *ev, int event_id) > +{ > + Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); > + Evas_Object *src_eo = _evas_object_image_source_get(eo_obj); > + Evas_Object_Protected_Data *src = eo_data_get(src_eo, > + EVAS_OBJ_CLASS); > + Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); > + //FIXME: consider coord transformation for map. > + Evas_Coord w1 = obj->cur.geometry.w; > + Evas_Coord h1 = obj->cur.geometry.h; > + Evas_Coord w2 = src->cur.geometry.w; > + Evas_Coord h2 = src->cur.geometry.h; > + Evas_Coord tx = e->pointer.x - obj->cur.geometry.x; > + Evas_Coord ty = e->pointer.y - obj->cur.geometry.y; > + if (w1 != w2) > + tx = (Evas_Coord) ((float)tx * ((float)w2 / (float)w1)); > + if (h1 != h2) > + ty = (Evas_Coord) ((float)ty * ((float)w2 / (float)w1)); > + Evas_Coord x = src->cur.geometry.x + tx; > + Evas_Coord y = src->cur.geometry.y + ty; > + if (src->is_smart) > + { > + Eina_List *in = NULL, *l = NULL; > + Evas_Object *child_eo; > + Evas_Object_Protected_Data *child; > + int no_rep = 0; > + //Optimize Here: Keep this list in proxy image for up and move > + in = _evas_event_object_list_raw_in_get(eo_e, in, > + evas_object_smart_members_get_direct(src_eo), NULL, x, y, &no_rep, EINA_TRUE); > + EINA_LIST_FOREACH(in, l, child_eo) > + { > + if (obj->delete_me || src->delete_me) return; > + child = eo_data_get(child_eo, EVAS_OBJ_CLASS); > + if (child->delete_me) continue; > + //FIXME: trasform the ev coords in src space also. > + evas_object_event_callback_call(child_eo, child, > + type, > + ev, > + event_id); > + } > + eina_list_free(in); > + } > + else > + evas_object_event_callback_call(src_eo, src, type, ev, event_id); > +} > + > static Eina_List * > _evas_event_object_list_in_get(Evas *eo_e, Eina_List *in, > const Eina_Inlist *list, Evas_Object *stop, > - int x, int y, int *no_rep) > + int x, int y, int *no_rep, Eina_Bool source) > { > if (!list) return NULL; > return _evas_event_object_list_raw_in_get(eo_e, in, list->last, stop, x, y, > - no_rep); > + no_rep, source); > } > > Eina_List * > @@ -177,7 +227,7 @@ > int no_rep = 0; > in = _evas_event_object_list_in_get(eo_e, in, > EINA_INLIST_GET(lay->objects), > - stop, x, y, &no_rep); > + stop, x, y, &no_rep, EINA_FALSE); > if (no_rep) return in; > } > return in; > @@ -411,7 +461,18 @@ > _evas_event_havemap_adjust(eo_obj, obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); > > if (!e->is_frozen) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_DOWN, &ev, event_id); > + { > + evas_object_event_callback_call(eo_obj, obj, > + EVAS_CALLBACK_MOUSE_DOWN, &ev, > + event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + { > + printf("MOUSE DOWN! %d\n", EVAS_CALLBACK_MOUSE_DOWN); > + _evas_object_source_event(eo_obj, eo_e, EVAS_CALLBACK_MOUSE_DOWN, > + &ev, event_id); > + } > + } > if (e->delete_me) break; > if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) > break; > @@ -469,7 +530,16 @@ > { > obj->mouse_in = 0; > if (!e->is_frozen) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); > + { > + evas_object_event_callback_call(eo_obj, obj, > + EVAS_CALLBACK_MOUSE_OUT, > + &ev, event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MOUSE_OUT, > + &ev, event_id); > + } > } > } > if (e->delete_me) break; > @@ -509,7 +579,15 @@ > { > obj_itr->mouse_in = 1; > if (!e->is_frozen) > - evas_object_event_callback_call(eo_obj_itr, obj_itr, EVAS_CALLBACK_MOUSE_IN, &ev_in, event_id); > + { > + evas_object_event_callback_call(eo_obj_itr, obj_itr, > + EVAS_CALLBACK_MOUSE_IN, &ev_in, event_id); > + //pass event to source > + if (obj_itr->proxy.is_proxy) > + _evas_object_source_event(eo_obj_itr, eo_e, > + EVAS_CALLBACK_MOUSE_IN, > + &ev, event_id); > + } > } > } > if (e->delete_me) break; > @@ -613,7 +691,16 @@ > { > if ((!e->is_frozen) && > (!evas_event_freezes_through(eo_obj, obj))) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_UP, &ev, event_id); > + { > + evas_object_event_callback_call(eo_obj, obj, > + EVAS_CALLBACK_MOUSE_UP, > + &ev, event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MOUSE_UP, > + &ev, event_id); > + } > } > if (e->delete_me) break; > if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) > @@ -730,7 +817,16 @@ > _evas_event_framespace_adjust(eo_obj, &ev.canvas.x, &ev.canvas.y); > _evas_event_havemap_adjust(eo_obj, obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); > if ((!e->is_frozen) && !evas_event_freezes_through(eo_obj, obj)) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev, event_id); > + { > + evas_object_event_callback_call(eo_obj, obj, > + EVAS_CALLBACK_MOUSE_WHEEL, &ev, > + event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MOUSE_WHEEL, &ev, > + event_id); > + } > if (e->delete_me) break; > } > if (copy) copy = eina_list_free(copy); > @@ -832,7 +928,14 @@ > (!obj->clip.clipees)) > { > if ((px != x) || (py != y)) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); > + { > + evas_object_event_callback_call(eo_obj, obj, > + EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); > + } > } > else > outs = eina_list_append(outs, eo_obj); > @@ -889,7 +992,15 @@ > if (!obj->delete_me) > { > if (!e->is_frozen) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); > + { > + evas_object_event_callback_call(eo_obj, > + obj, > + EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); > + } > } > } > } > @@ -981,6 +1092,11 @@ > ev.cur.canvas.y = e->pointer.y; > _evas_event_havemap_adjust(eo_obj, obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); > evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MOUSE_MOVE, > + &ev, event_id); > } > } > /* otherwise it has left the object */ > @@ -994,7 +1110,15 @@ > _evas_event_framespace_adjust(eo_obj, &ev2.canvas.x, &ev2.canvas.y); > _evas_event_havemap_adjust(eo_obj, obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed); > if (!e->is_frozen) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); > + { > + evas_object_event_callback_call(eo_obj, obj, > + EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MOUSE_OUT, > + &ev2, event_id); > + } > } > } > if (e->delete_me) break; > @@ -1020,7 +1144,16 @@ > { > obj->mouse_in = 1; > if (!e->is_frozen) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); > + { > + evas_object_event_callback_call(eo_obj, obj, > + EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MOUSE_IN, > + &ev3, event_id2); > + > + } > } > } > if (e->delete_me) break; > @@ -1118,7 +1251,7 @@ > ins = _evas_event_object_list_raw_in_get(eo_e, NULL, > EINA_INLIST_GET(below_obj), NULL, > e->pointer.x, e->pointer.y, > - &norep); > + &norep, EINA_FALSE); > } > EINA_LIST_FOREACH(copy, l, eo_obj) > { > @@ -1156,6 +1289,11 @@ > _evas_event_framespace_adjust(eo_obj, &ev.cur.canvas.x, &ev.cur.canvas.y); > _evas_event_havemap_adjust(eo_obj, obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); > evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MOUSE_MOVE, > + &ev, event_id); > } > } > /* otherwise it has left the object */ > @@ -1169,7 +1307,15 @@ > _evas_event_framespace_adjust(eo_obj, &ev2.canvas.x, &ev2.canvas.y); > _evas_event_havemap_adjust(eo_obj, obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed); > if (!e->is_frozen) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); > + { > + evas_object_event_callback_call(eo_obj, obj, > + EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MOUSE_OUT, > + &ev2, event_id); > + } > } > } > if (e->delete_me) break; > @@ -1195,7 +1341,15 @@ > { > obj->mouse_in = 1; > if (!e->is_frozen) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); > + { > + evas_object_event_callback_call(eo_obj, obj, > + EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MOUSE_IN, > + &ev3, event_id2); > + } > } > } > if (e->delete_me) break; > @@ -1273,7 +1427,16 @@ > { > obj->mouse_in = 1; > if (!e->is_frozen) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, &ev, event_id); > + { > + evas_object_event_callback_call(eo_obj, obj, > + EVAS_CALLBACK_MOUSE_IN, > + &ev, event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MOUSE_IN, > + &ev, event_id); > + } > } > } > if (e->delete_me) break; > @@ -1350,7 +1513,15 @@ > if (!obj->delete_me) > { > if (!e->is_frozen) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); > + { > + evas_object_event_callback_call(eo_obj, obj, > + EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MOUSE_OUT, > + &ev, event_id); > + } > } > obj->mouse_grabbed = 0; > } > @@ -1465,7 +1636,15 @@ > if (y != ev.canvas.y) > ev.canvas.ysub = ev.canvas.y; // fixme - lost precision > if (!e->is_frozen) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_DOWN, &ev, event_id); > + { > + evas_object_event_callback_call(eo_obj, obj, > + EVAS_CALLBACK_MULTI_DOWN, &ev, > + event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, EVAS_CALLBACK_MULTI_DOWN, > + &ev, event_id); > + } > if (e->delete_me) break; > } > if (copy) eina_list_free(copy); > @@ -1568,7 +1747,15 @@ > e->pointer.mouse_grabbed--; > } > if (!e->is_frozen) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_UP, &ev, event_id); > + { > + evas_object_event_callback_call(eo_obj, obj, > + EVAS_CALLBACK_MULTI_UP, &ev, > + event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, EVAS_CALLBACK_MULTI_UP, > + &ev, event_id); > + } > if (e->delete_me) break; > } > if (copy) copy = eina_list_free(copy); > @@ -1675,7 +1862,12 @@ > 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 > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); > + evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MULTI_MOVE, &ev, > + event_id); > } > if (e->delete_me) break; > } > @@ -1747,6 +1939,11 @@ > if (y != ev.cur.canvas.y) > ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision > evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, > + EVAS_CALLBACK_MULTI_MOVE, &ev, > + event_id); > } > if (e->delete_me) break; > } > @@ -1841,6 +2038,11 @@ > evas_object_event_callback_call(g->object, object_obj, > EVAS_CALLBACK_KEY_DOWN, > &ev, event_id); > + //pass event to source > + if (object_obj->proxy.is_proxy) > + _evas_object_source_event(g->object, eo_e, > + EVAS_CALLBACK_KEY_DOWN, > + &ev, event_id); > if (g->exclusive) exclusive = EINA_TRUE; > } > } > @@ -1870,8 +2072,17 @@ > { > Evas_Object_Protected_Data *focused_obj = eo_data_get(e->focused, EVAS_OBJ_CLASS); > if (!e->is_frozen && !evas_event_freezes_through(e->focused, focused_obj)) > - evas_object_event_callback_call(e->focused, focused_obj, EVAS_CALLBACK_KEY_DOWN, > - &ev, event_id); > + { > + evas_object_event_callback_call(e->focused, focused_obj, > + EVAS_CALLBACK_KEY_DOWN, > + &ev, event_id); > + //pass event to source > + if (focused_obj->proxy.is_proxy) > + _evas_object_source_event(e->focused, eo_e, > + EVAS_CALLBACK_KEY_DOWN, > + &ev, event_id); > + > + } > } > _evas_post_event_callback_call(eo_e, e); > if (ev.dev) _evas_device_unref(ev.dev); > @@ -1946,8 +2157,16 @@ > Evas_Object_Protected_Data *object_obj = eo_data_get(g->object, EVAS_OBJ_CLASS); > if (!e->is_frozen && > !evas_event_freezes_through(g->object, object_obj)) > - evas_object_event_callback_call(g->object, object_obj, > - EVAS_CALLBACK_KEY_UP, &ev, event_id); > + { > + evas_object_event_callback_call(g->object, object_obj, > + EVAS_CALLBACK_KEY_UP, > + &ev, event_id); > + //pass event to source > + if (object_obj->proxy.is_proxy) > + _evas_object_source_event(g->object, eo_e, > + EVAS_CALLBACK_KEY_UP, > + &ev, event_id); > + } > if (g->exclusive) exclusive = EINA_TRUE; > } > if (e->delete_me) break; > @@ -1978,8 +2197,16 @@ > { > Evas_Object_Protected_Data *focused_obj = eo_data_get(e->focused, EVAS_OBJ_CLASS); > if (!e->is_frozen && !evas_event_freezes_through(e->focused, focused_obj)) > - evas_object_event_callback_call(e->focused, focused_obj, EVAS_CALLBACK_KEY_UP, > - &ev, event_id); > + { > + evas_object_event_callback_call(e->focused, focused_obj, > + EVAS_CALLBACK_KEY_UP, > + &ev, event_id); > + //pass event to source > + if (focused_obj->proxy.is_proxy) > + _evas_object_source_event(e->focused, eo_e, > + EVAS_CALLBACK_KEY_UP, > + &ev, event_id); > + } > } > _evas_post_event_callback_call(eo_e, e); > if (ev.dev) _evas_device_unref(ev.dev); > @@ -2024,7 +2251,14 @@ > { > Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); > if ((!e->is_frozen) && !evas_event_freezes_through(eo_obj, obj)) > - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HOLD, &ev, event_id); > + { > + evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HOLD, > + &ev, event_id); > + //pass event to source > + if (obj->proxy.is_proxy) > + _evas_object_source_event(eo_obj, eo_e, EVAS_CALLBACK_HOLD, &ev, > + event_id); > + } > if (e->delete_me) break; > } > if (copy) copy = eina_list_free(copy); > > Modified: trunk/evas/src/lib/canvas/evas_object_image.c > =================================================================== > --- trunk/evas/src/lib/canvas/evas_object_image.c 2012-10-23 07:25:29 UTC (rev 78360) > +++ trunk/evas/src/lib/canvas/evas_object_image.c 2012-10-23 08:44:11 UTC (rev 78361) > @@ -89,6 +89,7 @@ > Eina_Bool filled : 1; > Eina_Bool proxyrendering : 1; > Eina_Bool source_invisible : 1; > + Eina_Bool source_events: 1; > Eina_Bool preloading : 1; > Eina_Bool video_surface : 1; > Eina_Bool video_visible : 1; > @@ -541,7 +542,7 @@ > } > > static void > -_image_source_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) > +_image_source_get(Eo *eo_obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) > { > const Evas_Object_Image *o = _pd; > Evas_Object **source = va_arg(*list, Evas_Object **); > @@ -557,6 +558,52 @@ > } > > EAPI void > +evas_object_image_source_events_set(Evas_Object *eo_obj, Eina_Bool source_events) > +{ > + MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); > + return; > + MAGIC_CHECK_END(); > + > + eo_do(eo_obj, evas_obj_image_source_events_set(source_events)); > +} > + > +static void > +_image_source_events_set(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) > +{ > + Evas_Object_Image *o = _pd; > + Eina_Bool source_events = va_arg(*list, int); > + > + source_events = !!source_events; > + if (o->source_events == source_events) return; > + o->source_events = source_events; > + if (!o->cur.source) return; > + if ((o->source_invisible) || (!source_events)) return; > + //FIXME: Feed mouse events here. > +} > + > +EAPI Eina_Bool > +evas_object_image_source_events_get(const Evas_Object *eo_obj) > +{ > + MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); > + return EINA_FALSE; > + MAGIC_CHECK_END(); > + > + Eina_Bool source_events; > + eo_do((Eo*)eo_obj, evas_obj_image_source_events_get(&source_events)); > + > + return source_events; > +} > + > +static void > +_image_source_events_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) > +{ > + Evas_Object_Image *o = _pd; > + Eina_Bool *source_events = va_arg(*list, Eina_Bool *); > + if (!source_events) return; > + *source_events = o->source_events; > +} > + > +EAPI void > evas_object_image_source_visible_set(Evas_Object *eo_obj, Eina_Bool visible) > { > MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); > @@ -583,6 +630,7 @@ > evas_object_smart_member_cache_invalidate(o->cur.source, EINA_FALSE, > EINA_FALSE, EINA_TRUE); > evas_object_change(o->cur.source, src_obj); > + if ((!visible) || (!o->source_events)) return; > //FIXME: Feed mouse events here. > } > > @@ -2619,8 +2667,10 @@ > if (!o->cur.source) return; > > Evas_Object_Protected_Data *cur_source = eo_data_get(o->cur.source, EVAS_OBJ_CLASS); > + Evas_Object_Protected_Data *cur_proxy = eo_data_get(proxy, EVAS_OBJ_CLASS); > > cur_source->proxy.proxies = eina_list_remove(cur_source->proxy.proxies, proxy); > + cur_proxy->proxy.is_proxy = EINA_FALSE; > > if (cur_source->proxy.source_invisible) > { > @@ -2642,10 +2692,12 @@ > _proxy_set(Evas_Object *eo_proxy, Evas_Object *eo_src) > { > Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS); > + Evas_Object_Protected_Data *proxy = eo_data_get(eo_proxy, EVAS_OBJ_CLASS); > Evas_Object_Image *o = eo_data_get(eo_proxy, MY_CLASS); > > evas_object_image_file_set(eo_proxy, NULL, NULL); > > + proxy->proxy.is_proxy = EINA_TRUE; > o->cur.source = eo_src; > o->load_error = EVAS_LOAD_ERROR_NONE; > > @@ -4340,6 +4392,12 @@ > evas_object_image_fill_set(obj, 0, 0, w, h); > } > > +Evas_Object * > +_evas_object_image_source_get(Evas_Object *eo_obj) > +{ > + Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); > + return o->cur.source; > +} > > Eina_Bool > _evas_object_image_preloading_get(const Evas_Object *eo_obj) > @@ -4489,6 +4547,8 @@ > EO_OP_FUNC(EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_SET), _image_animated_frame_set), > EO_OP_FUNC(EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_SET), _image_source_visible_set), > EO_OP_FUNC(EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_GET), _image_source_visible_get), > + EO_OP_FUNC(EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_EVENTS_SET), _image_source_events_set), > + EO_OP_FUNC(EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_EVENTS_GET), _image_source_events_get), > EO_OP_FUNC_SENTINEL > }; > > @@ -4562,6 +4622,8 @@ > EO_OP_DESCRIPTION(EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_SET, "Set the frame to current frame of an image object."), > EO_OP_DESCRIPTION(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_SET, "Set the source object visibility of a given image object being used as a proxy."), > EO_OP_DESCRIPTION(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_GET, "Get the source object visibility of a given image object being used as a proxy."), > + EO_OP_DESCRIPTION(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_EVENTS_SET, "Set the events to be repeated to the source object."), > + EO_OP_DESCRIPTION(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_EVENTS_GET, "Get the state of the source events."), > EO_OP_DESCRIPTION_SENTINEL > }; > > > Modified: trunk/evas/src/lib/include/evas_private.h > =================================================================== > --- trunk/evas/src/lib/include/evas_private.h 2012-10-23 07:25:29 UTC (rev 78360) > +++ trunk/evas/src/lib/include/evas_private.h 2012-10-23 08:44:11 UTC (rev 78361) > @@ -595,6 +595,7 @@ > Eina_List *proxies; > void *surface; > int w,h; > + Eina_Bool is_proxy : 1; > Eina_Bool redraw : 1; > Eina_Bool source_invisible : 1; > } proxy; > @@ -1013,6 +1014,7 @@ > Eina_Bool evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned int size) EINA_ARG_NONNULL(1); > const Evas_Smart_Cb_Description *evas_smart_cb_description_find(const Evas_Smart_Cb_Description_Array *a, const char *name) EINA_ARG_NONNULL(1, 2) EINA_PURE; > > +Evas_Object *_evas_object_image_source_get(Evas_Object *obj); > Eina_Bool _evas_object_image_preloading_get(const Evas_Object *obj); > void _evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading); > void _evas_object_image_preloading_check(Evas_Object *obj); > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel