diff --git a/oop_sys.html b/oop_sys.html index c9ea483c8577088caab50b02ec28fa7bf847fa0f..d17bebe57961398abe7a74858a5af2d0f96a981a 100644 --- a/oop_sys.html +++ b/oop_sys.html @@ -29,7 +29,8 @@ void oop_sys_delete(oop_source_sys *sys); event source interface and manages a select() loop. Once the system event source is created, use <a href="oop_sys_source">oop_sys_source()</a> to access the event source interface (which lets you register event sinks), and -<a href="oop_sys_run">oop_sys_run()</a> to actually process events. +<a href="oop_sys_run">oop_sys_run()</a> or +<a href="oop_sys_run">oop_sys_run_once()</a> to actually process events. More than one system event source can exist, though it is rarely useful to do so (since only one may be active at a time).<p> diff --git a/oop_sys_run.html b/oop_sys_run.html index b2a986da139fa09f58fd02edfc06d62f6434506c..b7c1311f7c1d7640b457311cebb0ad400e907eed 100644 --- a/oop_sys_run.html +++ b/oop_sys_run.html @@ -4,13 +4,14 @@ <link rel="stylesheet" type="text/css" href="style.css"> </head><body> -<h2>oop_sys_run()</h2> +<h2>oop_sys_run(), oop_sys_run_once()</h2> <pre> #include <oop.h> /* <em>Run the event loop.</em> */ oop_source *oop_sys_run(oop_source_sys *sys); +oop_source *oop_sys_run_once(oop_source_sys *sys); </pre> <h3>Arguments.</h3> @@ -21,11 +22,11 @@ oop_source *oop_sys_run(oop_source_sys *sys); <h3>Description.</h3> -This function starts waiting for events registered with the system event -source <em>sys</em>. As events (file descriptor activity, timed events, and -signals) occur, the appropriate event sinks are called. As long as these -callbacks return OOP_CONTINUE, the function continues running and processing -events.<p> +The oop_sys_run() function starts waiting for events registered with the +system event source <em>sys</em>. As events (file descriptor activity, timed +events, and signals) occur, the appropriate event sinks are called. As long +as these callbacks return OOP_CONTINUE, the function continues running and +processing events.<p> When one of the callbacks returns some other value, oop_sys_run returns this value. You can use this technique to allow callbacks to return data to the @@ -36,4 +37,9 @@ If an error occurs waiting for events, oop_sys_run returns OOP_ERROR. If no event sinks are registered (which would lead to an infinite delay), oop_sys_run returns OOP_CONTINUE.<p> +The oop_sys_run_once() function behaves just like oop_sys_run(), but returns +immediately after processing any pending results. The return values are the +same as oop_sys_run(), except that a return of OOP_CONTINUE does not +necessarily mean that no event sinks are registered.<p> + <hr><a href="ref">liboop reference</a></body></html> diff --git a/ref.html b/ref.html index 50bf9f5d7e1264857036a941807e18bb7dad1937..c9bb42b45f9021cc48aac11de89761dddcc24a5e 100644 --- a/ref.html +++ b/ref.html @@ -43,6 +43,7 @@ void <a href="oop_sys">oop_sys_delete</a>(oop_source_sys *); /* <em>Run the system event loop.</em> */ void *<a href="oop_sys_run">oop_sys_run</a>(oop_source_sys *); +void *<a href="oop_sys_run">oop_sys_run_once</a>(oop_source_sys *); /* <em>Get the standard source interface for a system event source.</em> */ oop_source *<a href="oop_sys_source">oop_sys_source</a>(oop_source_sys *);