Enlightenment CVS committal

Author  : ncn
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore


Modified Files:
        Ecore.h ecore_main.c 


Log Message:
Some restructuring, clean up, grouping, explaining, etc.  Getting there...
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/Ecore.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- Ecore.h     22 Sep 2004 04:25:35 -0000      1.14
+++ Ecore.h     22 Sep 2004 08:17:13 -0000      1.15
@@ -6,9 +6,18 @@
  * @brief The file that provides the program utility, main loop and timer
  *        functions.
  *
- * The following groups of functions are included with this file:
- * @li @ref Ecore_Exe_Basic_Group
- * @li @ref Ecore_Exe_Signal_Group
+ * This header provides the Ecore event handling loop.  For more
+ * details, see @ref Ecore_Main_Loop_Group.
+ *
+ * For the main loop to be of any use, you need to be able to add events
+ * and event handlers.
+ *
+ * There is also provision for callbacks for when the loop enters or
+ * exits an idle state. See @ref Idle_Group for more information.
+ *
+ * Functions are also provided for spawning child processes using fork.
+ * See @ref Ecore_Exe_Basic_Group and @ref Ecore_Exe_Signal_Group for
+ * more details.
  */
 
 #include <sys/types.h>
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/ecore_main.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- ecore_main.c        9 Jun 2004 10:35:01 -0000       1.11
+++ ecore_main.c        22 Sep 2004 08:17:14 -0000      1.12
@@ -31,11 +31,29 @@
 static double            t2 = 0.0;
 
 /**
- * Run 1 iteration of the main loop and process everything on the queue.
+ * @defgroup Ecore_Main_Loop_Group Main Loop Functions
+ *
+ * These functions control the Ecore event handling loop.  This loop is
+ * designed to work on embedded systems all the way to large and
+ * powerful mutli-cpu workstations.
+ *
+ * It serialises all system signals and events into a single event
+ * queue, that can be easily processed without needing to worry about
+ * concurrency.  A properly written, event-driven program using this
+ * kind of programming does not need threads.  It makes the program very
+ * robust and easy to follow.
+ * 
+ * Here is an example of simple program and its basic event loop flow:
+ * @image html prog_flow.png
+ *
+ * For examples of setting up and using a main loop, see
+ * @ref event_handler_example.c and @ref timer_example.c.
+ */
+
+/**
+ * Runs a single iteration of the main loop to process everything on the
+ * queue.
  * @ingroup Ecore_Main_Loop_Group
- * 
- * This function Processes 1 iteration of the main loop, handling anything on
- * the queue. See ecore_main_loop_begin() for more information.
  */
 void
 ecore_main_loop_iterate(void)
@@ -44,13 +62,11 @@
 }
 
 /**
- * Run the application main loop.
+ * Runs the application main loop.
+ *
+ * This function will not return until @ref ecore_main_loop_quit is called.
+ *
  * @ingroup Ecore_Main_Loop_Group
- * 
- * This function does not return until ecore_main_loop_quit() is called. It
- * will keep looping internally and call all callbacks set up to handle timers,
- * idle state and events Ecore recieves from X, fd's, IPC, signals etc. and
- * anything else that has registered a handler with ecore itself.
  */
 void
 ecore_main_loop_begin(void)
@@ -62,12 +78,9 @@
 }
 
 /**
- * Quit the main loop after it is done processing.
+ * Quits the main loop once all the events currently on the queue have
+ * been processed.
  * @ingroup Ecore_Main_Loop_Group
- * 
- * This function will flag a quit of the main loop once the current loop has
- * finished processing all events. It will not quit instantly, so expect more
- * callbacks to be called after this command has been issued.
  */
 void
 ecore_main_loop_quit(void)
@@ -76,6 +89,12 @@
 }
 
 /**
+ * @defgroup Ecore_FD_Handler_Group File Event Handling Functions
+ *
+ * To be written.
+ */
+
+/**
  * Add a handler for read/write notification of a file descriptor.
  * @param fd The file descriptor to watch
  * @param flags To watch it for read and/or write ability
@@ -155,11 +174,10 @@
 }
 
 /**
- * Return the file descriptor that the handler is handling
- * @param fd_handler The fd handler to query
- * @return The fd the handler is watching
- * 
- * This returns the fd the @p fd_handler is monitoring.
+ * Returns the file descriptor that the given handler is handling.
+ * @param   fd_handler The given FD handler.
+ * @return  The file descriptor the handler is watching
+ * @ingroup Ecore_FD_Handler_Group
  */
 int
 ecore_main_fd_handler_fd_get(Ecore_Fd_Handler *fd_handler)




-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to