1 #ifndef _SERVERS_INPUT_H
2 #define _SERVERS_INPUT_H
4 #include <minix/input.h>
7 #define EVENTBUF_SIZE 32
13 #define MOUSEMUX_MINOR 64
14 #define MOUSE0_MINOR 65
15 #define MOUSE_MINORS 4
19 #define FIRST_KBD_DEV 1
20 #define LAST_KBD_DEV (FIRST_KBD_DEV + KBD_MINORS - 1)
22 #define MOUSEMUX_DEV (LAST_KBD_DEV + 1)
23 #define FIRST_MOUSE_DEV (MOUSEMUX_DEV + 1)
24 #define LAST_MOUSE_DEV (FIRST_MOUSE_DEV + MOUSE_MINORS - 1)
26 #define INPUT_DEV_MAX (1 + KBD_MINORS + 1 + MOUSE_MINORS)
28 /* Input device state structure. */
30 devminor_t minor
; /* minor number of this device */
31 endpoint_t owner
; /* owning driver endpoint, or NONE */
32 char label
[DS_MAX_KEYLEN
]; /* label of owning driver */
33 struct input_event eventbuf
[EVENTBUF_SIZE
]; /* event ring buffer */
34 unsigned int tail
; /* tail into ring buffer */
35 unsigned int count
; /* number of elements in ring buffer */
36 int opened
; /* has a process opened the device? */
37 int suspended
; /* is a process suspended on a read? */
38 endpoint_t caller
; /* endpoint for suspended read */
39 cp_grant_id_t grant
; /* grant for suspended read */
40 cdev_id_t req_id
; /* request ID for suspended read */
41 endpoint_t selector
; /* read-selecting endpoint, or NONE */
42 unsigned int leds
; /* LED mask - saved across connects */
45 #endif /* !_SERVERS_INPUT_H */