This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch events
in repository www-content.
View the commit online.
commit d294b43484aa7ee16d54c3f9970ad5cd0dc91609
Author: tangcl <tan...@88.com>
AuthorDate: Thu Jan 11 18:16:21 2024 +0800
fix some typos of Events Programming Guide
---
pages/develop/guides/c/core/events.md.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pages/develop/guides/c/core/events.md.txt b/pages/develop/guides/c/core/events.md.txt
index 918facb22..742acfaa7 100644
--- a/pages/develop/guides/c/core/events.md.txt
+++ b/pages/develop/guides/c/core/events.md.txt
@@ -25,7 +25,7 @@ To register a callback method to be called when an object emits a given event us
efl_event_callback_add(object, event, callback, data);
```
-Substitute *object* for any ``Eo *`` or derived object and *event* for the identifier of the event (such as ``EFL_LOOP_EVENT_POLL_HIGH`` or ``EFL_LOOP_TIMER_EVENT_TICK``). Set *callback* to the method to be called when the event occurs and *data* to any data you want to pass to your callback (if you have no need of this use ``NULL``).
+Substitute *object* for any ``Eo *`` or derived object and *event* for the identifier of the event (such as ``EFL_LOOP_EVENT_POLL_HIGH`` or ``EFL_LOOP_TIMER_EVENT_TIMER_TICK``). Set *callback* to the method to be called when the event occurs and *data* to any data you want to pass to your callback (if you have no need of this use ``NULL``).
The method signature for the callback is:
@@ -52,7 +52,7 @@ efl_event_callback_del(object, event, callback, data);
The parameters here have the same meaning as for ``efl_event_callback_add()``. Note that in order to unregister the callback you have to provide **the same parameters** you used to register it. This is because you can register different callbacks to the same event or even the same callback with different *data*.
> **NOTE:**
-> Registering and unregistering callbacks is an resource-intensive process. If you perform these operations continuously on several callbacks at the same time do so in a batch as this is more efficient. You can use ``efl_even_callback_array_add()`` and ``efl_even_callback_array_del()`` to accomplish this. Remember however that you can't unregister an individual callback which has been registered in a batch. They must all be unregistered together.
+> Registering and unregistering callbacks is an resource-intensive process. If you perform these operations continuously on several callbacks at the same time do so in a batch as this is more efficient. You can use ``efl_event_callback_array_add()`` and ``efl_event_callback_array_del()`` to accomplish this. Remember however that you can't unregister an individual callback which has been registered in a batch. They must all be unregistered together.
Below is an example code snippet based on [reference/c/core/src/core_event.c](https://git.enlightenment.org/enlightenment/examples/src/branch/master/reference/c/core/src/core_event.c):
@@ -71,7 +71,7 @@ setup()
efl_add(EFL_LOOP_TIMER_CLASS, mainloop,
efl_name_set(efl_added, "timer2"),
efl_loop_timer_interval_set(efl_added, .1),
- efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, callback, polled));
+ efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, callback, mainloop));
[...]
}
```
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.