open a control channel to a mouse driver
#include <sys/mouse.h> struct _mouse_ctrl *mouse_open( nid_t nid, char *name; int fd );
The mouse_open() function opens up a control channel to the mouse driver. The returned pointer to a _mouse_ctrl structure can be used by subsequent calls to other mouse_... functions.
The (nid, name) pair identifies the registered name that has been attached by the mouse server. If ((nid_t) 0, NULL) is used, the default name of a local mouse server is assumed (that is, /dev/mouse).
In QNX 4.1 or later, the nid argument is ignored, and the name is used to identify both local and remote mice (for example, //2/dev/mouse).
The fd argument refers to an opened device that is associated with the mouse. This argument allows the mouse server to optionally track mouse interaction with a specific device (that is, current console). Usually, fd is 0 (that is, stdin).
An fd value of -1 opens the mouse for exclusive use, preventing other processes from opening the mouse. When opened for exclusive use, events from all consoles are generated.
A pointer to a control structure that's used in subsequent calls to the other mouse_... functions. On error, a NULL is returned, and errno is set.
errno, mouse_close(), mouse_flush(), mouse_param(), mouse_read()