Evas: Move smart data to legacy

This commit is contained in:
Jean-Philippe Andre 2016-06-17 14:30:44 +09:00
parent 9a052a740d
commit 3d1e474fc6
3 changed files with 21 additions and 18 deletions

View File

@ -5176,6 +5176,21 @@ EAPI void evas_object_smart_callback_description_find(const Evas_Object *obj, co
*/
EAPI Evas_Smart *evas_object_smart_smart_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Store a pointer to user data for a given smart object.
*
* This data is stored independently of the one set by evas_object_data_set(),
* naturally.
*
* See also @ref evas_object_smart_data_get.
*
* @param[in] data A pointer to user data.
*
* @ingroup Evas_Object_Smart
*/
EAPI void evas_object_smart_data_set(Evas_Object *obj, void *data);
EAPI void *evas_object_smart_data_get(const Evas_Object *obj);
/**
* This gets the internal counter that counts the number of smart calculations
*

View File

@ -120,17 +120,19 @@ static const Evas_Object_Func object_func =
/* public funcs */
EOLIAN static void
_evas_object_smart_data_set(Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *o, void *data)
EAPI void
evas_object_smart_data_set(Evas_Object *eo_obj, void *data)
{
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj);
if (o->data) eo_data_unref(eo_obj, o->data);
o->data = data;
eo_data_ref(eo_obj, NULL);
}
EOLIAN void *
_evas_object_smart_data_get(Evas_Object *eo_obj EINA_UNUSED, Evas_Smart_Data *o)
EAPI void *
evas_object_smart_data_get(const Evas_Object *eo_obj)
{
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj, NULL);
return o->data;
}

View File

@ -62,20 +62,6 @@ class Evas.Object.Smart (Evas.Object)
a: int;
}
}
@property data {
get {}
set {
[[Store a pointer to user data for a given smart object.
This data is stored independently of the one set by
evas_object_data_set(), naturally.
See also @.data.get.]]
}
values {
data: void_ptr; [[A pointer to user data.]]
}
}
@property members {
get {
[[Retrieves the list of the member objects of a given Evas smart object.