forked from enlightenment/efl
Calling callback 'unrealized' when an item is unrealized.
Patch by: Otavio Pontes <otavio@profusion.mobi> SVN revision: 54129
This commit is contained in:
parent
c911a2c5b2
commit
aec1fcd220
|
@ -846,6 +846,7 @@ extern "C" {
|
||||||
* unselected - User has unselected a item.
|
* unselected - User has unselected a item.
|
||||||
* clicked - User has double-clicked a item.
|
* clicked - User has double-clicked a item.
|
||||||
* realized - An evas object for a item was built.
|
* realized - An evas object for a item was built.
|
||||||
|
* unrealized - An evas object for a item was deleted.
|
||||||
* scroll - the content has been scrolled (moved).
|
* scroll - the content has been scrolled (moved).
|
||||||
* "scroll,drag,start" - dragging the contents around has started.
|
* "scroll,drag,start" - dragging the contents around has started.
|
||||||
* "scroll,drat,stop" - dragging the contents around has stopped.
|
* "scroll,drat,stop" - dragging the contents around has stopped.
|
||||||
|
|
|
@ -27,6 +27,9 @@
|
||||||
* from elm_gengrid_item_object_get() in a way where it may point to
|
* from elm_gengrid_item_object_get() in a way where it may point to
|
||||||
* freed objects.
|
* freed objects.
|
||||||
*
|
*
|
||||||
|
* unrealized - This is called when the real evas object for this item is
|
||||||
|
* deleted. event_info is the Gengrid item that was created.
|
||||||
|
*
|
||||||
* drag,start,up - Called when the item in the Gengrid has been dragged (not
|
* drag,start,up - Called when the item in the Gengrid has been dragged (not
|
||||||
* scrolled) up.
|
* scrolled) up.
|
||||||
*
|
*
|
||||||
|
@ -1022,11 +1025,10 @@ _item_place(Elm_Gengrid_Item *item, Evas_Coord cx, Evas_Coord cy)
|
||||||
x = cx * item->wd->item_width - item->wd->pan_x + ox + alignw;
|
x = cx * item->wd->item_width - item->wd->pan_x + ox + alignw;
|
||||||
y = cy * item->wd->item_height - item->wd->pan_y + oy + alignh;
|
y = cy * item->wd->item_height - item->wd->pan_y + oy + alignh;
|
||||||
|
|
||||||
|
Eina_Bool was_realized = item->realized;
|
||||||
if (ELM_RECTS_INTERSECT(x, y, item->wd->item_width, item->wd->item_height,
|
if (ELM_RECTS_INTERSECT(x, y, item->wd->item_width, item->wd->item_height,
|
||||||
cvx, cvy, cvw, cvh))
|
cvx, cvy, cvw, cvh))
|
||||||
{
|
{
|
||||||
Eina_Bool was_realized = item->realized;
|
|
||||||
|
|
||||||
_item_realize(item);
|
_item_realize(item);
|
||||||
if (!was_realized)
|
if (!was_realized)
|
||||||
evas_object_smart_callback_call(item->wd->self, "realized", item);
|
evas_object_smart_callback_call(item->wd->self, "realized", item);
|
||||||
|
@ -1035,7 +1037,11 @@ _item_place(Elm_Gengrid_Item *item, Evas_Coord cx, Evas_Coord cy)
|
||||||
item->wd->item_height);
|
item->wd->item_height);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_item_unrealize(item);
|
{
|
||||||
|
_item_unrealize(item);
|
||||||
|
if (was_realized)
|
||||||
|
evas_object_smart_callback_call(item->wd->self, "unrealized", item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Elm_Gengrid_Item *
|
static Elm_Gengrid_Item *
|
||||||
|
|
Loading…
Reference in New Issue