Lines Matching refs:act

532 static int	r_protocol(u_char b, mousestatus_t *act);
536 static void r_timestamp(mousestatus_t *act);
538 static void r_click(mousestatus_t *act);
553 static int kidspad(u_char rxc, mousestatus_t *act);
1794 r_protocol(u_char rBuf, mousestatus_t *act) in r_protocol() argument
1883 return (kidspad(rBuf, act)); in r_protocol()
1885 return (gtco_digipad(rBuf, act)); in r_protocol()
1971 act->dx = act->dy = act->dz = 0; in r_protocol()
1972 act->obutton = act->button; in r_protocol()
1974 act->button = (1 << (rBuf - 13)) in r_protocol()
1975 | (act->obutton & (MOUSE_BUTTON1DOWN | MOUSE_BUTTON3DOWN)); in r_protocol()
1995 act->dx = act->dy = 0; in r_protocol()
1996 act->dz = (rBuf & 0x08) ? (rBuf & 0x0f) - 16 : (rBuf & 0x0f); in r_protocol()
1997 if ((act->dz >= 7) || (act->dz <= -7)) in r_protocol()
1998 act->dz = 0; in r_protocol()
1999 act->obutton = act->button; in r_protocol()
2000 act->button = butmapintelli[(rBuf & MOUSE_MSS_BUTTONS) >> 4] in r_protocol()
2001 | (act->obutton & (MOUSE_BUTTON1DOWN | MOUSE_BUTTON3DOWN)); in r_protocol()
2005 act->dx = act->dy = act->dz = 0; in r_protocol()
2006 act->obutton = act->button; in r_protocol()
2007 act->button = butmapmss2[(rBuf & MOUSE_MSS_BUTTONS) >> 4] in r_protocol()
2008 | (act->obutton & (MOUSE_BUTTON1DOWN | MOUSE_BUTTON3DOWN)); in r_protocol()
2012 act->flags = ((act->dx || act->dy || act->dz) ? MOUSE_POSCHANGED : 0) in r_protocol()
2013 | (act->obutton ^ act->button); in r_protocol()
2015 return (act->flags); in r_protocol()
2033 act->dz = 0; in r_protocol()
2034 act->obutton = act->button; in r_protocol()
2040 act->button = act->obutton & MOUSE_BUTTON4DOWN; in r_protocol()
2042 act->button |= ((pBuf[0] & MOUSE_MSS_BUTTONS) == MOUSE_MSS_BUTTONS) in r_protocol()
2046 act->button |= (act->obutton & MOUSE_BUTTON2DOWN) in r_protocol()
2060 act->dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F)); in r_protocol()
2061 act->dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F)); in r_protocol()
2068 act->button = (act->obutton & (MOUSE_BUTTON2DOWN | MOUSE_BUTTON4DOWN)) in r_protocol()
2070 act->dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F)); in r_protocol()
2071 act->dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F)); in r_protocol()
2078 act->button = butmapmsc[(~pBuf[0]) & MOUSE_MSC_BUTTONS]; in r_protocol()
2079 act->dx = (signed char)(pBuf[1]) + (signed char)(pBuf[3]); in r_protocol()
2080 act->dy = - ((signed char)(pBuf[2]) + (signed char)(pBuf[4])); in r_protocol()
2085 act->dz = -1; in r_protocol()
2087 act->dz = 1; in r_protocol()
2089 act->button = MOUSE_BUTTON1DOWN; in r_protocol()
2091 act->button = 0; in r_protocol()
2095 act->button = butmaphit[pBuf[0] & 0x07]; in r_protocol()
2096 act->dx = (pBuf[0] & MOUSE_MM_XPOSITIVE) ? pBuf[1] : - pBuf[1]; in r_protocol()
2097 act->dy = (pBuf[0] & MOUSE_MM_YPOSITIVE) ? - pBuf[2] : pBuf[2]; in r_protocol()
2102 act->button = butmapmsc[pBuf[0] & MOUSE_MSC_BUTTONS]; in r_protocol()
2103 act->dx = (pBuf[0] & MOUSE_MM_XPOSITIVE) ? pBuf[1] : - pBuf[1]; in r_protocol()
2104 act->dy = (pBuf[0] & MOUSE_MM_YPOSITIVE) ? - pBuf[2] : pBuf[2]; in r_protocol()
2108 act->button = butmapversa[(pBuf[0] & MOUSE_VERSA_BUTTONS) >> 3]; in r_protocol()
2109 act->button |= (pBuf[0] & MOUSE_VERSA_TAP) ? MOUSE_BUTTON4DOWN : 0; in r_protocol()
2110 act->dx = act->dy = 0; in r_protocol()
2122 act->dx = prev_x - x; in r_protocol()
2123 act->dy = prev_y - y; in r_protocol()
2132 act->button = butmapps2[pBuf[0] & MOUSE_PS2_BUTTONS]; in r_protocol()
2133 act->dx = (pBuf[0] & MOUSE_PS2_XNEG) ? pBuf[1] - 256 : pBuf[1]; in r_protocol()
2134 act->dy = (pBuf[0] & MOUSE_PS2_YNEG) ? -(pBuf[2] - 256) : -pBuf[2]; in r_protocol()
2147 act->dz = (pBuf[3] & MOUSE_EXPLORER_ZNEG) in r_protocol()
2149 act->button |= (pBuf[3] & MOUSE_EXPLORER_BUTTON4DOWN) in r_protocol()
2151 act->button |= (pBuf[3] & MOUSE_EXPLORER_BUTTON5DOWN) in r_protocol()
2157 act->dz = (signed char)pBuf[3]; in r_protocol()
2158 if ((act->dz >= 7) || (act->dz <= -7)) in r_protocol()
2159 act->dz = 0; in r_protocol()
2161 act->button |= (pBuf[0] & MOUSE_PS2INTELLI_BUTTON4DOWN) in r_protocol()
2163 act->button |= (pBuf[0] & MOUSE_PS2INTELLI_BUTTON5DOWN) in r_protocol()
2168 && (abs(act->dx) > 191) in r_protocol()
2174 act->dx = act->dy = 0; in r_protocol()
2179 act->dz = (pBuf[2] & MOUSE_PS2PLUS_ZNEG) in r_protocol()
2182 act->button |= (pBuf[2] & MOUSE_PS2PLUS_BUTTON4DOWN) in r_protocol()
2184 act->button |= (pBuf[2] & MOUSE_PS2PLUS_BUTTON5DOWN) in r_protocol()
2193 act->dx = act->dy = 0; in r_protocol()
2196 act->dz = (pBuf[2] & MOUSE_SPOINT_WNEG) ? -2 : 2; in r_protocol()
2199 act->dz = (pBuf[2] & MOUSE_SPOINT_ZNEG) ? -1 : 1; in r_protocol()
2202 act->dz = (pBuf[2] & MOUSE_SPOINT_ZNEG) in r_protocol()
2206 act->dw = (pBuf[2] & MOUSE_SPOINT_WNEG) in r_protocol()
2214 act->dx = act->dy = 0; in r_protocol()
2215 act->button = act->obutton; in r_protocol()
2223 act->button |= act->obutton & MOUSE_EXTBUTTONS; in r_protocol()
2228 act->button |= ((pBuf[0] & MOUSE_PS2_TAP)) ? 0 : MOUSE_BUTTON4DOWN; in r_protocol()
2232 act->button |= (pBuf[3] & MOUSE_PS2_BUTTON3DOWN) in r_protocol()
2234 act->button |= (pBuf[3] & MOUSE_PS2_BUTTON1DOWN) in r_protocol()
2236 act->dz = (pBuf[3] & MOUSE_PS2_XNEG) ? pBuf[4] - 256 : pBuf[4]; in r_protocol()
2240 act->button |= (pBuf[0] & MOUSE_PS2_TAP) ? MOUSE_BUTTON4DOWN : 0; in r_protocol()
2243 act->button = butmapversaps2[pBuf[0] & MOUSE_PS2VERSA_BUTTONS]; in r_protocol()
2244 act->button |= in r_protocol()
2246 act->dx = act->dy = 0; in r_protocol()
2258 act->dx = prev_x - x; in r_protocol()
2259 act->dy = prev_y - y; in r_protocol()
2267 act->dx = (pBuf[1] & 0x80) ? pBuf[1] - 256 : pBuf[1]; in r_protocol()
2268 act->dy = (pBuf[2] & 0x80) ? -(pBuf[2] - 256) : -pBuf[2]; in r_protocol()
2271 act->dz = 1; in r_protocol()
2274 act->dz = -1; in r_protocol()
2277 act->dz = 2; in r_protocol()
2280 act->dz = -2; in r_protocol()
2285 if ((act->dx < 16 - 256) && (act->dy > 256 - 16)) { in r_protocol()
2286 act->dx = act->dy = 0; in r_protocol()
2288 act->button |= MOUSE_BUTTON4DOWN; in r_protocol()
2289 act->dz = (pBuf[2] & MOUSE_4DPLUS_ZNEG) in r_protocol()
2293 act->button |= act->obutton & MOUSE_EXTBUTTONS; in r_protocol()
2303 act->button = butmapmsc[(~pBuf[0]) & MOUSE_SYS_STDBUTTONS]; in r_protocol()
2304 act->dx = (signed char)(pBuf[1]) + (signed char)(pBuf[3]); in r_protocol()
2305 act->dy = - ((signed char)(pBuf[2]) + (signed char)(pBuf[4])); in r_protocol()
2307 act->dz = ((signed char)(pBuf[5] << 1) + (signed char)(pBuf[6] << 1)) >> 1; in r_protocol()
2308 act->button |= ((~pBuf[7] & MOUSE_SYS_EXTBUTTONS) << 3); in r_protocol()
2321 act->flags = ((act->dx || act->dy || act->dz) ? MOUSE_POSCHANGED : 0) in r_protocol()
2322 | (act->obutton ^ act->button); in r_protocol()
2324 return (act->flags); in r_protocol()
2506 r_timestamp(mousestatus_t *act) in r_timestamp() argument
2516 mask = act->flags & MOUSE_BUTTONS; in r_timestamp()
2539 if (act->button & button) { in r_timestamp()
2554 if (act->button & button) { in r_timestamp()
2559 act->flags |= button; in r_timestamp()
2588 r_click(mousestatus_t *act) in r_click() argument
2595 mask = act->flags & MOUSE_BUTTONS; in r_click()
2603 if (act->button & button) { in r_click()
3190 kidspad(u_char rxc, mousestatus_t *act) in kidspad() argument
3221 act->flags = 0; in kidspad()
3222 act->obutton = act->button; in kidspad()
3223 act->dx = act->dy = act->dz = 0; in kidspad()
3228 act->flags |= MOUSE_POSCHANGED; /* force update */ in kidspad()
3233 act->dx = x - x_prev; in kidspad()
3234 act->dy = y - y_prev; in kidspad()
3235 if (act->dx || act->dy) in kidspad()
3236 act->flags |= MOUSE_POSCHANGED; in kidspad()
3240 act->button = 0; in kidspad()
3242 act->button |= MOUSE_BUTTON1DOWN; in kidspad()
3244 act->button |= MOUSE_BUTTON2DOWN; in kidspad()
3245 act->flags |= MOUSE_BUTTONSCHANGED; in kidspad()
3248 return (act->flags); in kidspad()
3252 gtco_digipad (u_char rxc, mousestatus_t *act) in gtco_digipad() argument
3286 act->flags = 0; in gtco_digipad()
3287 act->obutton = act->button; in gtco_digipad()
3288 act->dx = act->dy = act->dz = 0; in gtco_digipad()
3293 act->flags |= MOUSE_POSCHANGED; /* force update */ in gtco_digipad()
3299 act->dx = x - x_prev; in gtco_digipad()
3300 act->dy = y - y_prev; in gtco_digipad()
3301 if (act->dx || act->dy) in gtco_digipad()
3302 act->flags |= MOUSE_POSCHANGED; in gtco_digipad()
3308 act->button = 0; in gtco_digipad()
3311 act->button |= MOUSE_BUTTON1DOWN; in gtco_digipad()
3315 act->button |= MOUSE_BUTTON2DOWN; in gtco_digipad()
3319 act->button |= MOUSE_BUTTON3DOWN; in gtco_digipad()
3323 act->button |= MOUSE_BUTTON4DOWN; in gtco_digipad()
3325 act->flags |= MOUSE_BUTTONSCHANGED; in gtco_digipad()
3328 return (act->flags); in gtco_digipad()