oop_sys_new(), oop_sys_delete()
#include <oop.h>
/* Create and destroy a system event source. */
oop_source_sys *oop_sys_new(void);
void oop_sys_delete(oop_source_sys *sys);
Arguments.
- oop_source_sys *sys
- The event source to deallocate and destroy.
Description.
- oop_sys_new
- Create a new system event source. The system event source implements the
event source interface and manages a select() loop. Once the system event
source is created, use oop_sys_source() to
access the event source interface (which lets you register event sinks), and
oop_sys_run() or
oop_sys_run_once() 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).
If a malloc failure occurs creating the system event source, NULL is returned.
It is up to the caller to handle this failure.
- oop_sys_delete
- Destroy the system event source sys. This frees all resources
associated with the event source. The source cannot have any active callbacks
(event sinks) associated with it.
liboop reference