AG_EventSink * AG_AddEventSink (enum ag_event_sink_type type, int ident, Uint flags, AG_EventSinkFn fn, const char *fnArgs)
void AG_DelEventSink (AG_EventSink *sink)
void AG_DelEventsSinkByIdent (enum ag_event_sink_type type, int ident, Uint flags)
AG_EventSink * AG_AddEventPrologue (AG_EventSinkFn fn, const char *fnArgs, ...)
AG_EventSink * AG_AddEventEpilogue (AG_EventSinkFn fn, const char *fnArgs, ...)
AG_EventSink * AG_AddEventSpinner (AG_EventSinkFn fn, const char *fnArgs, ...)
void AG_DelEventPrologue (AG_EventSink *sink)
void AG_DelEventEpilogue (AG_EventSink *sink)
void AG_DelEventSpinner (AG_EventSink *sink)
|
The
AG_AddEventSink() routine creates a new event sink under the current thread, and returns
a pointer to a newly-allocated
AG_EventSink structure.
The
type argument may be one of:
AG_SINK_READ | Data is available for reading on file referenced by
ident. | AG_SINK_WRITE | Data is available for writing on file referenced by
ident. | AG_SINK_FSEVENT | A filesystem event has occurred on the file/directory
referenced by
ident. The type of event is specified in
flags (see
FILESYSTEM EVENTS for the accepted flags).
| AG_SINK_PROCEVENT | An event has occurred on the monitored process
ident. The type of event is specified in
flags (see
PROCESS EVENTS below).
|
The
AG_DelEventSink() function destroys the specified event sink.
The
AG_DelEventSinksByIdent() function destroys all event sinks with matching
ident and
flags.
The
AG_AddEventPrologue() function registers a callback routine to be invoked once at the
start of
AG_EventLoop(). AG_AddEventEpilogue() registers a callback routine to be invoked on exit, before
AG_EventLoop() returns.
AG_DelEventEpilogue() and
AG_DelEventPrologue() destroy the specified epilogue/prologue routine.
The
AG_AddEventSpinner() routine registers a "spinner" callback routine.
Spinner routines are invoked repeatedly and unconditionally by
AG_EventLoop(), until the event loop terminates, or
AG_DelEventSpinner() is invoked.
|