EAPI void efl_xunref(Eo *obj, const Eo *ref_obj);
/**
+ * @brief Add a new weak reference to obj.
+ *
+ * This function registers the object handle pointed by wref to obj so when obj
+ * is deleted it'll be updated to NULL. This functions should be used when you
+ * want to keep track of an object in a safe way, but you don't want to prevent
+ * it from being freed.
+ *
+ * @param[in] wref The weak ref
+ */
+EOAPI void efl_wref_add(Eo *obj, Efl_Object **wref);
+
+/**
+ * @brief Delete the weak reference passed.
+ *
+ * @param[in] wref The weak ref
+ */
+EOAPI void efl_wref_del(Eo *obj, Efl_Object **wref);
+
+/**
* @brief Enable or disable the manual free feature.
* @param obj the object to work on.
* @param manual_free indicates if the free is manual (EINA_TRUE) or automatic (EINA_FALSE).
}
return: Efl.Object; [[The first object found]]
}
- wref_add {
- [[Add a new weak reference to obj.
-
- This function registers the object handle pointed by wref to
- obj so when obj is deleted it'll be updated to NULL. This
- functions should be used when you want to keep track of an
- object in a safe way, but you don't want to prevent it from
- being freed.
- ]]
- params {
- @in wref: ptr(Efl.Object); [[The weak ref]]
- }
- }
- wref_del {
- [[Delete the weak reference passed.]]
- params {
- @in wref: ptr(Efl.Object); [[The weak ref]]
- }
- }
@property key_data {
[[Generic data with string key on an object.
}
}
+EOAPI EFL_VOID_FUNC_BODYV(efl_wref_add, EFL_FUNC_CALL(wref), Efl_Object **wref);
+
EOLIAN static void
_efl_object_wref_del(Eo *obj, Efl_Object_Data *pd, Eo **wref)
{
return;
}
+EOAPI EFL_VOID_FUNC_BODYV(efl_wref_del, EFL_FUNC_CALL(wref), Efl_Object **wref);
+
static inline void
_wref_destruct(Efl_Object_Data *pd)
{
EFL_OBJECT_OP_FUNC(efl_event_callback_call, _efl_object_event_callback_call), \
EFL_OBJECT_OP_FUNC(efl_event_callback_legacy_call, _efl_object_event_callback_legacy_call), \
EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _efl_object_dbg_info_get), \
- EFL_OBJECT_OP_FUNC(efl_future_link, _efl_object_future_link)
+ EFL_OBJECT_OP_FUNC(efl_future_link, _efl_object_future_link), \
+ EFL_OBJECT_OP_FUNC(efl_wref_add, _efl_object_wref_add), \
+ EFL_OBJECT_OP_FUNC(efl_wref_del, _efl_object_wref_del)
#include "efl_object.eo.c"