diff options
author | Leandro Pereira <leandro@profusion.mobi> | 2012-12-18 16:26:44 +0000 |
---|---|---|
committer | Leandro Pereira <leandro@profusion.mobi> | 2012-12-18 16:26:44 +0000 |
commit | a7b4a3c12d737462b09a71f25c5624f1489dd659 (patch) | |
tree | d0d20b4ba7457b1e661ddf67c2c73e24203e31a6 /src/lib/evas/Evas.h | |
parent | 645dcff9d203e6315e6672a8ecbda66bc9b9dc53 (diff) |
evas: Async render
SVN revision: 81282
Diffstat (limited to 'src/lib/evas/Evas.h')
-rw-r--r-- | src/lib/evas/Evas.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/lib/evas/Evas.h b/src/lib/evas/Evas.h index 8e59b8ebdb..4f7da82627 100644 --- a/src/lib/evas/Evas.h +++ b/src/lib/evas/Evas.h | |||
@@ -1671,6 +1671,31 @@ EAPI void evas_obscured_rectangle_add(Evas *e, int x, int y, int w, | |||
1671 | EAPI void evas_obscured_clear(Evas *e) EINA_ARG_NONNULL(1); | 1671 | EAPI void evas_obscured_clear(Evas *e) EINA_ARG_NONNULL(1); |
1672 | 1672 | ||
1673 | /** | 1673 | /** |
1674 | * Render the given Evas canvas asynchronously. | ||
1675 | * | ||
1676 | * @param e The canvas to render. | ||
1677 | * @param func Optional function to call with the list of updated areas. | ||
1678 | * @param data User data to pass to @p func. | ||
1679 | * | ||
1680 | * @return EINA_TRUE if the canvas will render, EINA_FALSE otherwise. | ||
1681 | * | ||
1682 | * This function only returns EINA_TRUE whne a frame will be rendered. If the | ||
1683 | * previous frame is still rendering, EINA_FALSE will be returned so the users | ||
1684 | * know not to wait for the updates callback and just return to their main | ||
1685 | * loop. | ||
1686 | * | ||
1687 | * If a @p func callback is given, a list of updated areas will be generated | ||
1688 | * and the function will be called from the main thread after the rendered | ||
1689 | * frame is flushed to the screen. The resulting list should be freed with | ||
1690 | * @f evas_render_updates_free(). | ||
1691 | * The list is given in the @p event_info parameter of the callback function. | ||
1692 | * | ||
1693 | * @ingroup Evas_Canvas | ||
1694 | * @since 1.8 | ||
1695 | */ | ||
1696 | EAPI Eina_Bool evas_render_async(Evas *e, Evas_Event_Cb func, void *data) EINA_ARG_NONNULL(1); | ||
1697 | |||
1698 | /** | ||
1674 | * Force immediate renderization of the given Evas canvas. | 1699 | * Force immediate renderization of the given Evas canvas. |
1675 | * | 1700 | * |
1676 | * @param e The given canvas pointer. | 1701 | * @param e The given canvas pointer. |
@@ -2425,6 +2450,7 @@ enum | |||
2425 | EVAS_CANVAS_SUB_ID_OBJECTS_IN_RECTANGLE_GET, | 2450 | EVAS_CANVAS_SUB_ID_OBJECTS_IN_RECTANGLE_GET, |
2426 | EVAS_CANVAS_SUB_ID_SMART_OBJECTS_CALCULATE, | 2451 | EVAS_CANVAS_SUB_ID_SMART_OBJECTS_CALCULATE, |
2427 | EVAS_CANVAS_SUB_ID_SMART_OBJECTS_CALCULATE_COUNT_GET, | 2452 | EVAS_CANVAS_SUB_ID_SMART_OBJECTS_CALCULATE_COUNT_GET, |
2453 | EVAS_CANVAS_SUB_ID_RENDER_ASYNC, | ||
2428 | EVAS_CANVAS_SUB_ID_LAST | 2454 | EVAS_CANVAS_SUB_ID_LAST |
2429 | }; | 2455 | }; |
2430 | 2456 | ||
@@ -3692,6 +3718,19 @@ enum | |||
3692 | */ | 3718 | */ |
3693 | #define evas_canvas_smart_objects_calculate_count_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_SMART_OBJECTS_CALCULATE_COUNT_GET), EO_TYPECHECK(int *, ret) | 3719 | #define evas_canvas_smart_objects_calculate_count_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_SMART_OBJECTS_CALCULATE_COUNT_GET), EO_TYPECHECK(int *, ret) |
3694 | 3720 | ||
3721 | /** | ||
3722 | * @def evas_canvas_render_async | ||
3723 | * @since 1.8 | ||
3724 | * | ||
3725 | * Render canvas asynchronously | ||
3726 | * | ||
3727 | * @param[in] func Callback function for list of updates | ||
3728 | * @param[in] data User data pointer to pass to func | ||
3729 | * @param[out] ret Whether or not a frame will get rendered after the call | ||
3730 | * | ||
3731 | * @see evas_render_async | ||
3732 | */ | ||
3733 | #define evas_canvas_render_async(func, data, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_RENDER_ASYNC), EO_TYPECHECK(Evas_Event_Cb, func), EO_TYPECHECK(void *, data), EO_TYPECHECK(Eina_Bool *, ret) | ||
3695 | 3734 | ||
3696 | 3735 | ||
3697 | 3736 | ||