efl/eo: add an interface to give the list of parameter directly.
authorCedric BAIL <cedric.bail@free.fr>
Tue, 12 Feb 2013 10:20:15 +0000 (10:20 +0000)
committerCedric BAIL <cedric.bail@free.fr>
Tue, 12 Feb 2013 10:20:15 +0000 (10:20 +0000)
I restrained myself to not name it vodooooo !

SVN revision: 83850

src/lib/eo/Eo.h
src/lib/eo/eo.c

index 16257f8..0dc6490 100644 (file)
@@ -574,6 +574,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()
  * @see eo_class_do_internal
@@ -595,6 +602,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
  * @param ... NULL terminated list of OPs and parameters.
index 9e70aa2..141d3b1 100644 (file)
@@ -439,6 +439,14 @@ eo_do_internal(Eo *obj, Eo_Op_Type op_type, ...)
 }
 
 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, ...)
 {
    const Eo_Class *nklass;