efl/eo: add an interface to give the list of parameter directly.

I restrained myself to not name it vodooooo !


SVN revision: 83850
This commit is contained in:
Cedric BAIL 2013-02-12 10:20:15 +00:00
parent db3eb71dde
commit 495bcba4ac
2 changed files with 29 additions and 0 deletions

View File

@ -573,6 +573,13 @@ EAPI Eina_Bool eo_shutdown(void);
*/
#define eo_do(obj, ...) eo_do_internal(obj, EO_OP_TYPE_REGULAR, __VA_ARGS__, EO_NOOP)
/**
* @def eo_vdo
* A convenience wrapper around eo_vdo_internal()
* @see eo_vdo_internal
*/
#define eo_vdo(obj, args) eo_vdo_internal(obj, EO_OP_TYPE_REGULAR, args)
/**
* @def eo_class_do
* A convenience wrapper around eo_class_do_internal()
@ -594,6 +601,20 @@ EAPI Eina_Bool eo_shutdown(void);
*/
EAPI Eina_Bool eo_do_internal(Eo *obj, Eo_Op_Type op_type, ...);
/**
* @brief Calls op functions of an object
* @param obj The object to work on
* @param op_type The type of the ops that are passed.
* @param ops NULL terminated list of OPs and parameters.
* @return @c EINA_TRUE on success.
*
* Use the helper macros, don't pass the parameters manually.
* Use #eo_vdo instead of this function.
*
* @see #eo_vdo
*/
EAPI Eina_Bool eo_vdo_internal(Eo *obj, Eo_Op_Type op_type, va_list *ops);
/**
* @brief Calls op functions of a class.
* @param klass The class to work on

View File

@ -438,6 +438,14 @@ eo_do_internal(Eo *obj, Eo_Op_Type op_type, ...)
return ret;
}
EAPI Eina_Bool
eo_vdo_internal(Eo *obj, Eo_Op_Type op_type, va_list *ops)
{
EO_MAGIC_RETURN_VAL(obj, EO_EINA_MAGIC, EINA_FALSE);
return _eo_dov_internal(obj, op_type, ops);
}
EAPI Eina_Bool
eo_do_super_internal(Eo *obj, Eo_Op_Type op_type, Eo_Op op, ...)
{