Lines Matching defs:mouse

39  ** Mouse daemon : listens to a serial port, the bus mouse interface, or
40 ** the PS/2 mouse port for mouse data stream, interprets data and passes
43 ** The mouse interface functions are derived closely from the mouse
51 #include <sys/mouse.h>
195 /* interface (the table must be ordered by MOUSE_IF_XXX in mouse.h) */
204 /* types (the table must be ordered by MOUSE_PROTO_XXX in mouse.h) */
358 /* the table must be ordered by MOUSE_PROTO_XXX in mouse.h */
394 int mfd; /* mouse file descriptor */
396 int mremsfd; /* mouse remote server file descriptor */
397 int mremcfd; /* mouse remote client file descriptor */
401 mousehw_t hw; /* mouse device hardware information */
810 warnx("no such mouse type `%s'", optarg);
873 logwarnx("cannot determine mouse type on %s", rodent.portname);
991 struct mouse_info mouse;
992 mousestatus_t action0; /* original mouse action */
1024 /* clear mouse data */
1028 bzero(&mouse, sizeof(mouse));
1042 mouse.operation = MOUSE_MOTION_EVENT;
1043 extioctl = (ioctl(rodent.cfd, CONS_MOUSECTL, &mouse) == 0);
1045 /* process mouse data */
1061 logwarn("failed to read from mouse");
1086 /* mouse movement */
1262 mouse.operation = MOUSE_MOTION_EVENT;
1263 mouse.u.data.buttons = action2.button;
1266 &mouse.u.data.x, &mouse.u.data.y);
1270 &mouse.u.data.x, &mouse.u.data.y);
1272 mouse.u.data.z = action2.dz;
1275 ioctl(rodent.cfd, CONS_MOUSECTL, &mouse);
1278 mouse.operation = MOUSE_ACTION;
1279 mouse.u.data.buttons = action2.button;
1282 &mouse.u.data.x, &mouse.u.data.y);
1286 &mouse.u.data.x, &mouse.u.data.y);
1288 mouse.u.data.z = action2.dz;
1291 ioctl(rodent.cfd, CONS_MOUSECTL, &mouse);
1309 mouse.operation = MOUSE_ACTION;
1310 mouse.u.data.buttons = action2.button;
1311 mouse.u.data.x = mouse.u.data.y = mouse.u.data.z = 0;
1314 ioctl(rodent.cfd, CONS_MOUSECTL, &mouse);
1432 /* the following table must be ordered by MOUSE_PROTO_XXX in mouse.h */
1442 { 0xc0, 0x00, 0x00, 0x00, 3, 0x00, 0xff }, /* PS/2 mouse */
1493 logwarnx("unknown mouse protocol (%d)", rodent.mode.protocol);
1499 logwarnx("mouse type mismatch (%s != %s), %s is assumed",
1511 /* maybe this is a PnP mouse... */
1519 debug("PnP serial mouse: '%*.*s' '%*.*s' '%*.*s'",
1539 logwarnx("mouse type mismatch (%s != %s), %s is assumed",
1602 ** plus a 4th byte for the middle button. However, the mouse might
1615 ** mouse. Selected by sequence "*U".
1896 * NOTE/2: On a PS/2 mouse any byte is valid as a data byte. Furthermore,
1897 * 0x80 is not valid as a header byte. For a PS/2 mouse we skip
1899 * For resyncing a PS/2 mouse we require the two most significant
1924 * Unfortunately this mouse has variable length packets: the standard
1964 * This mouse has 16! buttons in addition to the standard
2137 * which sends mouse data in MOUSE_PROTO_SYSMOUSE protocol.
2349 * events to allow for mouse jitter. If more movement events
2590 struct mouse_info mouse;
2605 mouse.u.event.value = mstate[i]->count;
2608 mouse.u.event.value = 0;
2610 mouse.operation = MOUSE_BUTTON_EVENT;
2611 mouse.u.event.id = button;
2614 ioctl(rodent.cfd, CONS_MOUSECTL, &mouse);
2615 debug("button %d count %d", i + 1, mouse.u.event.value);
2657 logwarn("unable to get status of mouse fd");
2690 logwarn("unable to set status of mouse fd");
2723 logwarn("unable to write to mouse fd");
2730 logwarn("unable to set status of mouse fd");
2778 * The PnP COM device spec. dictates that the mouse must set DSR
2900 usleep(240000); /* the mouse must send `Begin ID' within 200msec */
2989 debug("non-PnP mouse '%c'", buf[0]);
3106 /* this is not a mouse! */
3336 /* Open a UNIX domain stream socket to listen for mouse remote clients */
3372 logwarnx("failed accept on mouse remote socket");