From 495bcba4ace68443b9a6ef2cc8f68bc90944ba31 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Tue, 12 Feb 2013 10:20:15 +0000 Subject: [PATCH] efl/eo: add an interface to give the list of parameter directly. I restrained myself to not name it vodooooo ! SVN revision: 83850 --- src/lib/eo/Eo.h | 21 +++++++++++++++++++++ src/lib/eo/eo.c | 8 ++++++++ 2 files changed, 29 insertions(+) diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index 16257f8bf2..0dc6490abf 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -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 diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 9e70aa243f..141d3b19c9 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -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, ...) {