summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-08-26 19:39:23 -0300
committerGuilherme Iscaro <iscaro@profusion.mobi>2017-09-04 10:24:00 -0300
commit8e80d3d2dc162312070d043e622747b17d4e1763 (patch)
tree2430f2b8f5ac0ffbd63900bfcb980b7558468f47
parentd258774c2ad108fbb0d59e4f3b513349510669e1 (diff)
downloadefl-8e80d3d2dc162312070d043e622747b17d4e1763.tar.gz
export efl_future_then() for Eina_Future syntax sugar.
This is actually written as efl_future_Eina_FutureXXX_then() as the old API clashes, after removing the old code we'll "sed" to fix those.
-rw-r--r--src/lib/eo/Eo.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index f548381008..869910292c 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -535,10 +535,22 @@ EOAPI Eina_Future_Desc efl_future_cb_from_desc(Eo *obj, const Efl_Future_Cb_Desc
* @endcode
*
* @see efl_future_cb_from_desc()
+ * @see efl_future_Eina_FutureXXX_then()
*/
#define efl_future_cb(_eo, ...) efl_future_cb_from_desc(_eo, (Efl_Future_Cb_Desc){__VA_ARGS__})
/**
+ * Syntax sugar over eina_future_then_from_desc() and efl_future_cb().
+ *
+ * Usage:
+ * @code
+ * efl_future_Eina_FutureXXX_then(o, future, .success = success, .success_type = EINA_VALUE_TYPE_INT);
+ * @endcode
+ *
+ */
+#define efl_future_Eina_FutureXXX_then(_eo, _future, ...) eina_future_then_from_desc(_future, efl_future_cb(_eo, ## __VA_ARGS__))
+
+/**
* Creates an Future chain based on #Efl_Future_Cb_Desc
*
* This function is an wrapper around efl_future_cb_from_desc() and eina_future_then_from_desc()