forked from enlightenment/efl
Update docs for efl_add() and efl_add_ref()
Reviewers: cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D6023 Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
This commit is contained in:
parent
9c23ffb675
commit
5d1e1bf3ae
|
@ -1427,20 +1427,23 @@ EAPI Eo *_efl_added_get(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def efl_add
|
* @def efl_add
|
||||||
* @brief Create a new object and call its constructor (If it exists).
|
* @brief Create a new object and add it to an existing parent object.
|
||||||
*
|
*
|
||||||
* The object returned by this function will always have 1 ref
|
* The object returned by this function will always have 1 ref
|
||||||
* (reference count) irrespective of whether the parent is NULL or
|
* (reference count) which belongs to its parent. Therefore, it is not safe
|
||||||
* not.
|
* to use the returned object outside the constructor methods passed as
|
||||||
|
* parameters. If you need to further manipulate the object, use #efl_add_ref
|
||||||
|
* and remember to #efl_unref the object when done.
|
||||||
|
*
|
||||||
* If the object is created using this function, then it will
|
* If the object is created using this function, then it will
|
||||||
* automatically be deleted when the parent object is.
|
* automatically be deleted when the parent object is.
|
||||||
* There is no need to call efl_unref on the child. This is convenient
|
* There is no need to call efl_unref on the child. This is convenient
|
||||||
* in C.
|
* in C.
|
||||||
*
|
*
|
||||||
* If you want a more "consistent" behaviour, see #efl_add_ref.
|
* If the object's class has a constructor, it is called.
|
||||||
*
|
*
|
||||||
* @param klass the class of the object to create.
|
* @param klass The class of the object to create.
|
||||||
* @param parent the parent to set to the object.
|
* @param parent The parent to set to the object (MUST not be @c NULL)
|
||||||
* @param ... The ops to run.
|
* @param ... The ops to run.
|
||||||
* @return An handle to the new object on success, NULL otherwise.
|
* @return An handle to the new object on success, NULL otherwise.
|
||||||
*/
|
*/
|
||||||
|
@ -1448,16 +1451,19 @@ EAPI Eo *_efl_added_get(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def efl_add_ref
|
* @def efl_add_ref
|
||||||
* @brief Create a new object and call its constructor (If it exists).
|
* @brief Create a new object, add it to an existing parent object and return
|
||||||
|
* an extra reference for further manipulation.
|
||||||
*
|
*
|
||||||
* The object returned by this function has 1 ref for itself, 1 ref from the
|
* The object returned by this function has 1 ref which belongs to the caller.
|
||||||
* parent (if exists) and possible other refs if were added during construction.
|
* If a parent object is provided (@c parent is not @c NULL) then the object
|
||||||
* If a child object is created using this, then it won't get deleted
|
* has an additional reference for the parent. Note that if a child object is
|
||||||
* when the parent object is until you manually remove the ref
|
* created in this way then it won't get automatically deleted with the parent.
|
||||||
* by calling efl_unref().
|
* You need to manually remove the extra ref by calling #efl_unref.
|
||||||
*
|
*
|
||||||
* @param klass the class of the object to create.
|
* If the object's class has a constructor, it is called.
|
||||||
* @param parent the parent to set to the object.
|
*
|
||||||
|
* @param klass The class of the object to create.
|
||||||
|
* @param parent The parent to set to the object (can be @c NULL).
|
||||||
* @param ... The ops to run.
|
* @param ... The ops to run.
|
||||||
* @return An handle to the new object on success, NULL otherwise.
|
* @return An handle to the new object on success, NULL otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue