{
const char *name; /**< name of the event. */
const char *doc; /**< Explanation about the event. */
+
+ Eina_Bool unfreezable; /**< Eina_True if the event cannot be frozen */
};
/**
* @param doc Additional doc for the event.
* @see Eo_Event_Description
*/
-#define EO_EVENT_DESCRIPTION(name, doc) { name, doc }
+#define EO_EVENT_DESCRIPTION(name, doc) { name, doc, EINA_FALSE }
+
+/**
+ * @def EO_HOT_EVENT_DESCRIPTION(name, doc)
+ * An helper macro to help populating #Eo_Event_Description and make
+ * the event impossible to freeze.
+ * @param name The name of the event.
+ * @param doc Additional doc for the event.
+ * @see Eo_Event_Description
+ * @see EO_EVENT_DESCRIPTION
+ */
+#define EO_HOT_EVENT_DESCRIPTION(name, doc) { name, doc, EINA_TRUE }
+
+
/**
* @}
struct _Eo_Callback_Description
{
Eo_Callback_Description *next;
+
union
{
Eo_Callback_Array_Item item;
const Eo_Callback_Array_Item *item_array;
} items;
+
void *func_data;
Eo_Callback_Priority priority;
+
Eina_Bool delete_me : 1;
Eina_Bool func_array : 1;
};
if (ret) *ret = EINA_TRUE;
- if (event_freeze_count || pd->event_freeze_count)
- return;
-
/* FIXME: Change eo_ref to _eo_ref and unref. */
eo_ref(obj);
pd->walking_list++;
{
if (it->desc != desc)
continue;
+ if (!it->desc->unfreezable &&
+ (event_freeze_count || pd->event_freeze_count))
+ continue;
+
/* Abort callback calling if the func says so. */
if (!it->func((void *) cb->func_data, obj, desc,
(void *) event_info))
}
else
{
+ if ((!cb->items.item.desc
+ || !cb->items.item.desc->unfreezable) &&
+ (event_freeze_count || pd->event_freeze_count))
+ continue;
+
if (cb->items.item.desc == desc)
{
/* Abort callback calling if the func says so. */