Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore
Modified Files:
ecore_events.c
Log Message:
1. fix docs for event handlers. oops. that was wrong
2. default op for exit event is to quit the main loop if u dont set handlers
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/ecore_events.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ecore_events.c 8 Oct 2003 15:04:54 -0000 1.3
+++ ecore_events.c 9 Oct 2003 02:20:37 -0000 1.4
@@ -33,10 +33,10 @@
* provided in this call as the @p data parameter.
*
* When the callback @p func is called, it must return 1 or 0. If it returns
- * 1, It will keep being called as per normal, when events come into the event
- * queue. If it returns 0, it will be removed from the list of event handlers
- * and be destroyed. If this happens the event handler object returned is no
- * longer valid, and the handler will not be called again after it returns 0.
+ * 1, It will keep being called as per normal, for each handler set up for that
+ * event type. If it returns 0, it will cease processing handlers for that
+ * particular event, so all handler set to handle that event type that have not
+ * already been called, will not be.
*
* @code
* #include <Ecore.h>
@@ -421,6 +421,9 @@
e = (Ecore_Event *)l;
if (!e->delete_me)
{
+ int handle_count;
+
+ handle_count = 0;
ecore_raw_event_type = e->type;
ecore_raw_event_event = e->event;
for (ll = (Ecore_List *)event_handlers; ll; ll = ll->next)
@@ -432,11 +435,16 @@
{
if (eh->type == e->type)
{
+ handle_count++;
if (!eh->func(eh->data, e->type, e->event))
break; /* 0 == "call no further handlers" */
}
}
}
+ /* if no handlers were set for EXIT signal - then default is */
+ /* to quit the main loop */
+ if ((e->type == ECORE_EVENT_SIGNAL_EXIT) && (handle_count == 0))
+ ecore_main_loop_quit();
ecore_raw_event_type = ECORE_EVENT_NONE;
ecore_raw_event_event = NULL;
}
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs