summaryrefslogtreecommitdiff
path: root/src/lib/eo
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 /src/lib/eo
parentd258774c2ad108fbb0d59e4f3b513349510669e1 (diff)
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.
Diffstat (limited to 'src/lib/eo')
-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
535 * @endcode 535 * @endcode
536 * 536 *
537 * @see efl_future_cb_from_desc() 537 * @see efl_future_cb_from_desc()
538 * @see efl_future_Eina_FutureXXX_then()
538 */ 539 */
539#define efl_future_cb(_eo, ...) efl_future_cb_from_desc(_eo, (Efl_Future_Cb_Desc){__VA_ARGS__}) 540#define efl_future_cb(_eo, ...) efl_future_cb_from_desc(_eo, (Efl_Future_Cb_Desc){__VA_ARGS__})
540 541
541/** 542/**
543 * Syntax sugar over eina_future_then_from_desc() and efl_future_cb().
544 *
545 * Usage:
546 * @code
547 * efl_future_Eina_FutureXXX_then(o, future, .success = success, .success_type = EINA_VALUE_TYPE_INT);
548 * @endcode
549 *
550 */
551#define efl_future_Eina_FutureXXX_then(_eo, _future, ...) eina_future_then_from_desc(_future, efl_future_cb(_eo, ## __VA_ARGS__))
552
553/**
542 * Creates an Future chain based on #Efl_Future_Cb_Desc 554 * Creates an Future chain based on #Efl_Future_Cb_Desc
543 * 555 *
544 * This function is an wrapper around efl_future_cb_from_desc() and eina_future_then_from_desc() 556 * This function is an wrapper around efl_future_cb_from_desc() and eina_future_then_from_desc()