Add feature: convenience call: evas_event_thaw_eval()

SVN revision: 59727
This commit is contained in:
Carsten Haitzler 2011-05-27 08:26:11 +00:00
parent 646781851c
commit bdba0b8171
3 changed files with 26 additions and 0 deletions

View File

@ -366,3 +366,8 @@
* Fix Evas table to use actual fractional weights, not just
boolean expand/not expand from weight value.
2011-05-27 Carsten Haitzler (The Rasterman)
* Add evas_event_thaw_eval() for conveneince of evaluating in state
and callbacks of the pointer after a thaw is complete.

View File

@ -1906,6 +1906,17 @@ EAPI void evas_event_thaw (Evas *e) EINA_ARG_NONN
*/
EAPI int evas_event_freeze_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
/**
* After thaw of a canvas, re-evaluate the state of objects and call callbacks
*
* @param e The canvas to evaluate after a thaw
*
* This is normally called after evas_event_thaw() to re-evaluate mouse
* containment and other states and thus also call callbacks for mouse in and
* out on new objects if the state change demands it.
*/
EAPI void evas_event_thaw_eval (Evas *e) EINA_ARG_NONNULL(1);
/**
* @defgroup Evas_Event_Feeding_Group Event Feeding Functions
*

View File

@ -189,6 +189,16 @@ evas_event_freeze_get(const Evas *e)
return e->events_frozen;
}
EAPI void
evas_event_thaw_eval(Evas *e)
{
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return;
MAGIC_CHECK_END();
if (e->events_frozen != 0) return;
evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y,
e->last_timestamp, NULL);
}
EAPI void
evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)