Using the event manager API

Event manager calls

``Event manager library calls'' lists the event manager routines for managing and accessing an event queue and the attached devices.

Event manager library calls

Function Description
ev_init initialize event queue
ev_open open the event queue, attach event devices
ev_close close the event queue and all attached devices
ev_count return the number of events in the queue
ev_read get a pointer to the ``top'' event
ev_pop pop the ``top'' event off the queue
ev_block sleep until the queue is nonempty
ev_flush pop (discard) all events in the queue
ev_getdev get a list of devices feeding the queue
ev_gindev exclude or later re-include a event device
ev_setemask mask out certain kinds of events
ev_getemask get the current event mask
ev_suspend suspend the active event queue (make it inactive)
ev_resume resume the suspended event queue

All of the event manager routines that return an integer return a negative number if they fail. All of these routines with the exception of ev_init(S) and ev_open(S) fail if the calling program did not first initialize an event queue with the ev_init(S) routine.

The constants and types used in the event manager are defined in /usr/include/mouse.h.

Next topic: A sample program
Previous topic: Using the event queue

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003