docs: Document event info calling convention

Both at the emitter (efl_event_callback_call) and the receiver
(info field in the Efl.Event structure).
The Events tutorial should repeat this.
Fixes T7760

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8486
This commit is contained in:
Xavi Artigas 2019-03-27 15:10:57 +00:00 committed by Marcel Hollerbach
parent 62b3759db5
commit 9f1cd60aeb
2 changed files with 9 additions and 2 deletions

View File

@ -311,7 +311,10 @@ EOAPI Eina_Bool efl_event_callback_array_del(Eo *obj, const Efl_Callback_Array_I
* @brief Call the callbacks for an event of an object.
*
* @param[in] desc The description of the event to call.
* @param[in] event_info Extra event info to pass to the callbacks.
* @param[in] event_info Extra event info to pass to the callbacks. Please provide objects of the same type as
* advertised in the EO file, as this is what listeners of this event will be expecting. Keep in mind that:
* 1) Objects must be passed as a normal Eo*. Event subscribers can call functions on these objects.
* 2) Structs, built-in types and containers must be passed as const pointers, with one level of indirection.
*
* @return @c false If one of the callbacks aborted the call, @c true otherwise
*/

View File

@ -424,5 +424,9 @@ struct Efl.Event {
]]
object: Efl.Object; [[The object the callback was called on.]]
desc: const(ptr(Efl.Event_Description)); [[The event description.]]
info: void_ptr; [[Extra event information passed by the event caller]]
info: void_ptr; [[Extra event information passed by the event caller.
Must be cast to the event type declared in the EO file. Keep in mind that:
1) Objects are passed as a normal Eo*. Event subscribers can call functions on these objects.
2) Structs, built-in types and containers are passed as const pointers, with one level of indirection.
]]
}