|
|
#include <sys/types.h> #include <sys/param.h> #include <sys/sysmacros.h> #include <sys/page.h> #include <sys/event.h> #include <mouse.h>int ev_init()
int ev_initf (fd) int fd;\(L>
ev_initf reads the system event-configuration files and initializes the event manager, using a file descriptor (fd) as argument to specify where the event queue should be attached. The file descriptor (fd) for ev_init is always 0.
This is the first of two steps that a program follows to obtain an event queue. Devices such as mice or the keyboard may be read through an event queue. When ev_init or ev_initf is called, the configuration files are read and checked for syntax. If there is an error or inconsistency, ev_init and ev_initf return an error. After the event manager is initialized, ev_open(S) should be called to obtain an event queue.