Lines Matching full:act

398 static int	r_uinput_report(int fd, mousestatus_t *act);
405 static int r_protocol(u_char b, mousestatus_t *act);
421 static int kidspad(u_char rxc, mousestatus_t *act);
849 r_uinput_report(int fd, mousestatus_t *act) in r_uinput_report() argument
854 if ((act->dx != 0 && uinput_event(fd, EV_REL, REL_X, act->dx) < 0) || in r_uinput_report()
855 (act->dy != 0 && uinput_event(fd, EV_REL, REL_Y, act->dy) < 0) || in r_uinput_report()
856 (act->dz != 0 && uinput_event(fd, EV_REL, REL_WHEEL, -act->dz) < 0)) in r_uinput_report()
861 if ((act->button & mask) == (act->obutton & mask)) in r_uinput_report()
864 (act->button & mask) != 0) < 0) in r_uinput_report()
1291 r_protocol(u_char rBuf, mousestatus_t *act) in r_protocol() argument
1380 return (kidspad(rBuf, act)); in r_protocol()
1382 return (gtco_digipad(rBuf, act)); in r_protocol()
1468 act->dx = act->dy = act->dz = 0; in r_protocol()
1469 act->obutton = act->button; in r_protocol()
1471 act->button = (1 << (rBuf - 13)) in r_protocol()
1472 | (act->obutton & (MOUSE_BUTTON1DOWN | MOUSE_BUTTON3DOWN)); in r_protocol()
1492 act->dx = act->dy = 0; in r_protocol()
1493 act->dz = (rBuf & 0x08) ? (rBuf & 0x0f) - 16 : (rBuf & 0x0f); in r_protocol()
1494 if ((act->dz >= 7) || (act->dz <= -7)) in r_protocol()
1495 act->dz = 0; in r_protocol()
1496 act->obutton = act->button; in r_protocol()
1497 act->button = butmapintelli[(rBuf & MOUSE_MSS_BUTTONS) >> 4] in r_protocol()
1498 | (act->obutton & (MOUSE_BUTTON1DOWN | MOUSE_BUTTON3DOWN)); in r_protocol()
1502 act->dx = act->dy = act->dz = 0; in r_protocol()
1503 act->obutton = act->button; in r_protocol()
1504 act->button = butmapmss2[(rBuf & MOUSE_MSS_BUTTONS) >> 4] in r_protocol()
1505 | (act->obutton & (MOUSE_BUTTON1DOWN | MOUSE_BUTTON3DOWN)); in r_protocol()
1509 act->flags = ((act->dx || act->dy || act->dz) ? MOUSE_POSCHANGED : 0) in r_protocol()
1510 | (act->obutton ^ act->button); in r_protocol()
1512 return (act->flags); in r_protocol()
1530 act->dz = 0; in r_protocol()
1531 act->obutton = act->button; in r_protocol()
1537 act->button = act->obutton & MOUSE_BUTTON4DOWN; in r_protocol()
1539 act->button |= ((pBuf[0] & MOUSE_MSS_BUTTONS) == MOUSE_MSS_BUTTONS) in r_protocol()
1543 act->button |= (act->obutton & MOUSE_BUTTON2DOWN) in r_protocol()
1557 act->dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F)); in r_protocol()
1558 act->dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F)); in r_protocol()
1565 act->button = (act->obutton & (MOUSE_BUTTON2DOWN | MOUSE_BUTTON4DOWN)) in r_protocol()
1567 act->dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F)); in r_protocol()
1568 act->dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F)); in r_protocol()
1575 act->button = butmapmsc[(~pBuf[0]) & MOUSE_MSC_BUTTONS]; in r_protocol()
1576 act->dx = (signed char)(pBuf[1]) + (signed char)(pBuf[3]); in r_protocol()
1577 act->dy = - ((signed char)(pBuf[2]) + (signed char)(pBuf[4])); in r_protocol()
1582 act->dz = -1; in r_protocol()
1584 act->dz = 1; in r_protocol()
1586 act->button = MOUSE_BUTTON1DOWN; in r_protocol()
1588 act->button = 0; in r_protocol()
1592 act->button = butmaphit[pBuf[0] & 0x07]; in r_protocol()
1593 act->dx = (pBuf[0] & MOUSE_MM_XPOSITIVE) ? pBuf[1] : - pBuf[1]; in r_protocol()
1594 act->dy = (pBuf[0] & MOUSE_MM_YPOSITIVE) ? - pBuf[2] : pBuf[2]; in r_protocol()
1599 act->button = butmapmsc[pBuf[0] & MOUSE_MSC_BUTTONS]; in r_protocol()
1600 act->dx = (pBuf[0] & MOUSE_MM_XPOSITIVE) ? pBuf[1] : - pBuf[1]; in r_protocol()
1601 act->dy = (pBuf[0] & MOUSE_MM_YPOSITIVE) ? - pBuf[2] : pBuf[2]; in r_protocol()
1605 act->button = butmapversa[(pBuf[0] & MOUSE_VERSA_BUTTONS) >> 3]; in r_protocol()
1606 act->button |= (pBuf[0] & MOUSE_VERSA_TAP) ? MOUSE_BUTTON4DOWN : 0; in r_protocol()
1607 act->dx = act->dy = 0; in r_protocol()
1619 act->dx = prev_x - x; in r_protocol()
1620 act->dy = prev_y - y; in r_protocol()
1629 act->button = butmapps2[pBuf[0] & MOUSE_PS2_BUTTONS]; in r_protocol()
1630 act->dx = (pBuf[0] & MOUSE_PS2_XNEG) ? pBuf[1] - 256 : pBuf[1]; in r_protocol()
1631 act->dy = (pBuf[0] & MOUSE_PS2_YNEG) ? -(pBuf[2] - 256) : -pBuf[2]; in r_protocol()
1644 act->dz = (pBuf[3] & MOUSE_EXPLORER_ZNEG) in r_protocol()
1646 act->button |= (pBuf[3] & MOUSE_EXPLORER_BUTTON4DOWN) in r_protocol()
1648 act->button |= (pBuf[3] & MOUSE_EXPLORER_BUTTON5DOWN) in r_protocol()
1654 act->dz = (signed char)pBuf[3]; in r_protocol()
1655 if ((act->dz >= 7) || (act->dz <= -7)) in r_protocol()
1656 act->dz = 0; in r_protocol()
1658 act->button |= (pBuf[0] & MOUSE_PS2INTELLI_BUTTON4DOWN) in r_protocol()
1660 act->button |= (pBuf[0] & MOUSE_PS2INTELLI_BUTTON5DOWN) in r_protocol()
1665 && (abs(act->dx) > 191) in r_protocol()
1671 act->dx = act->dy = 0; in r_protocol()
1676 act->dz = (pBuf[2] & MOUSE_PS2PLUS_ZNEG) in r_protocol()
1679 act->button |= (pBuf[2] & MOUSE_PS2PLUS_BUTTON4DOWN) in r_protocol()
1681 act->button |= (pBuf[2] & MOUSE_PS2PLUS_BUTTON5DOWN) in r_protocol()
1690 act->dx = act->dy = 0; in r_protocol()
1693 act->dz = (pBuf[2] & MOUSE_SPOINT_WNEG) ? -2 : 2; in r_protocol()
1696 act->dz = (pBuf[2] & MOUSE_SPOINT_ZNEG) ? -1 : 1; in r_protocol()
1699 act->dz = (pBuf[2] & MOUSE_SPOINT_ZNEG) in r_protocol()
1703 act->dw = (pBuf[2] & MOUSE_SPOINT_WNEG) in r_protocol()
1711 act->dx = act->dy = 0; in r_protocol()
1712 act->button = act->obutton; in r_protocol()
1720 act->button |= act->obutton & MOUSE_EXTBUTTONS; in r_protocol()
1725 act->button |= ((pBuf[0] & MOUSE_PS2_TAP)) ? 0 : MOUSE_BUTTON4DOWN; in r_protocol()
1729 act->button |= (pBuf[3] & MOUSE_PS2_BUTTON3DOWN) in r_protocol()
1731 act->button |= (pBuf[3] & MOUSE_PS2_BUTTON1DOWN) in r_protocol()
1733 act->dz = (pBuf[3] & MOUSE_PS2_XNEG) ? pBuf[4] - 256 : pBuf[4]; in r_protocol()
1737 act->button |= (pBuf[0] & MOUSE_PS2_TAP) ? MOUSE_BUTTON4DOWN : 0; in r_protocol()
1740 act->button = butmapversaps2[pBuf[0] & MOUSE_PS2VERSA_BUTTONS]; in r_protocol()
1741 act->button |= in r_protocol()
1743 act->dx = act->dy = 0; in r_protocol()
1755 act->dx = prev_x - x; in r_protocol()
1756 act->dy = prev_y - y; in r_protocol()
1764 act->dx = (pBuf[1] & 0x80) ? pBuf[1] - 256 : pBuf[1]; in r_protocol()
1765 act->dy = (pBuf[2] & 0x80) ? -(pBuf[2] - 256) : -pBuf[2]; in r_protocol()
1768 act->dz = 1; in r_protocol()
1771 act->dz = -1; in r_protocol()
1774 act->dz = 2; in r_protocol()
1777 act->dz = -2; in r_protocol()
1782 if ((act->dx < 16 - 256) && (act->dy > 256 - 16)) { in r_protocol()
1783 act->dx = act->dy = 0; in r_protocol()
1785 act->button |= MOUSE_BUTTON4DOWN; in r_protocol()
1786 act->dz = (pBuf[2] & MOUSE_4DPLUS_ZNEG) in r_protocol()
1790 act->button |= act->obutton & MOUSE_EXTBUTTONS; in r_protocol()
1800 act->button = butmapmsc[(~pBuf[0]) & MOUSE_SYS_STDBUTTONS]; in r_protocol()
1801 act->dx = (signed char)(pBuf[1]) + (signed char)(pBuf[3]); in r_protocol()
1802 act->dy = - ((signed char)(pBuf[2]) + (signed char)(pBuf[4])); in r_protocol()
1804 act->dz = ((signed char)(pBuf[5] << 1) + (signed char)(pBuf[6] << 1)) >> 1; in r_protocol()
1805 act->button |= ((~pBuf[7] & MOUSE_SYS_EXTBUTTONS) << 3); in r_protocol()
1818 act->flags = ((act->dx || act->dy || act->dz) ? MOUSE_POSCHANGED : 0) in r_protocol()
1819 | (act->obutton ^ act->button); in r_protocol()
1821 return (act->flags); in r_protocol()
2404 kidspad(u_char rxc, mousestatus_t *act) in kidspad() argument
2435 act->flags = 0; in kidspad()
2436 act->obutton = act->button; in kidspad()
2437 act->dx = act->dy = act->dz = 0; in kidspad()
2442 act->flags |= MOUSE_POSCHANGED; /* force update */ in kidspad()
2447 act->dx = x - x_prev; in kidspad()
2448 act->dy = y - y_prev; in kidspad()
2449 if (act->dx || act->dy) in kidspad()
2450 act->flags |= MOUSE_POSCHANGED; in kidspad()
2454 act->button = 0; in kidspad()
2456 act->button |= MOUSE_BUTTON1DOWN; in kidspad()
2458 act->button |= MOUSE_BUTTON2DOWN; in kidspad()
2459 act->flags |= MOUSE_BUTTONSCHANGED; in kidspad()
2462 return (act->flags); in kidspad()
2466 gtco_digipad (u_char rxc, mousestatus_t *act) in gtco_digipad() argument
2500 act->flags = 0; in gtco_digipad()
2501 act->obutton = act->button; in gtco_digipad()
2502 act->dx = act->dy = act->dz = 0; in gtco_digipad()
2507 act->flags |= MOUSE_POSCHANGED; /* force update */ in gtco_digipad()
2513 act->dx = x - x_prev; in gtco_digipad()
2514 act->dy = y - y_prev; in gtco_digipad()
2515 if (act->dx || act->dy) in gtco_digipad()
2516 act->flags |= MOUSE_POSCHANGED; in gtco_digipad()
2522 act->button = 0; in gtco_digipad()
2525 act->button |= MOUSE_BUTTON1DOWN; in gtco_digipad()
2529 act->button |= MOUSE_BUTTON2DOWN; in gtco_digipad()
2533 act->button |= MOUSE_BUTTON3DOWN; in gtco_digipad()
2537 act->button |= MOUSE_BUTTON4DOWN; in gtco_digipad()
2539 act->flags |= MOUSE_BUTTONSCHANGED; in gtco_digipad()
2542 return (act->flags); in gtco_digipad()