evas: Revise documentation for evas_async_events*()

Summary:
Straightens up grammar and simplifies phrasing to make the functions
purposes clearer.

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4874
This commit is contained in:
Bryce Harrington 2017-05-12 14:46:55 +09:00 committed by Jean-Philippe Andre
parent 9f9d2177bf
commit 226c1cff82
1 changed files with 18 additions and 27 deletions

View File

@ -780,47 +780,39 @@ EAPI int evas_shutdown(void);
EAPI Evas_Alloc_Error evas_alloc_error(void); EAPI Evas_Alloc_Error evas_alloc_error(void);
/** /**
* @brief Get evas' internal asynchronous events read file descriptor. * @brief Access the canvas' asynchronous event queue.
* *
* @return The canvas' asynchronous events read file descriptor. * @return A file descriptor to the asynchronous events.
* *
* Evas' asynchronous events are meant to be dealt with internally, * Normally, Evas handles asynchronous events internally, particularly
* i.e., when building stuff to be glued together into the EFL * in Evas-using modules that are part of the EFL infrastructure.
* infrastructure -- a module, for example. The context that demands * Notably, ecore-evas takes care of processing these events for
* its use is when calculations need to be done out of the main * canvases instantiated through it.
* thread, asynchronously, and some action must be performed after
* that.
* *
* An example of actual use of this API is for image asynchronous * However, when asynchronous calculations need to be done outside the
* preload inside evas. If the canvas was instantiated through * main thread (in some other mainloop) with some followup action, this
* ecore-evas usage, ecore itself will take care of calling those * function permits accessing the events. An example would be
* events' processing. * asynchronous image preloading.
*
* This function returns the read file descriptor where to get the
* asynchronous events of the canvas. Naturally, other mainloops,
* apart from ecore, may make use of it.
* *
* @ingroup Evas_Main_Group * @ingroup Evas_Main_Group
*/ */
EAPI int evas_async_events_fd_get(void) EINA_WARN_UNUSED_RESULT; EAPI int evas_async_events_fd_get(void) EINA_WARN_UNUSED_RESULT;
/** /**
* @brief Trigger the processing of all events waiting on the file * @brief Process the asynchronous event queue.
* descriptor returned by evas_async_events_fd_get().
* *
* @return The number of events processed. * @return The number of events processed.
* *
* All asynchronous events queued up by evas_async_events_put() are * Triggers the callback functions for asynchronous events that were
* processed here. More precisely, the callback functions, informed * queued up by evas_async_events_put(). The callbacks are called in
* together with other event parameters, when queued, get called (with * the same order that they were queued.
* those parameters), in that order.
* *
* @ingroup Evas_Main_Group * @ingroup Evas_Main_Group
*/ */
EAPI int evas_async_events_process(void); EAPI int evas_async_events_process(void);
/** /**
* Insert asynchronous events on the canvas. * @brief Insert asynchronous events on the canvas.
* *
* @param target The target to be affected by the events. * @param target The target to be affected by the events.
* @param type The type of callback function. * @param type The type of callback function.
@ -829,10 +821,9 @@ EAPI int evas_async_events_process(void);
* *
* @return EINA_FALSE if an error occurred, EINA_TRUE otherwise. * @return EINA_FALSE if an error occurred, EINA_TRUE otherwise.
* *
* This is the way, for a routine running outside evas' main thread, * Allows routines running outside Evas' main thread to report an
* to report an asynchronous event. A callback function is informed, * asynchronous event. The target, type, and event info will be passed
* whose call is to happen after evas_async_events_process() is * to the callback function when evas_async_events_process() is called.
* called.
* *
* @ingroup Evas_Main_Group * @ingroup Evas_Main_Group
*/ */