| plan 9 kernel history: overview | file list | diff list |
2000/1024/bitsy/devpenmouse.c (diff list | history)
| 2000/1021/sys/src/9/bitsy/devpenmouse.c:90,100 – 2000/1024/sys/src/9/bitsy/devpenmouse.c:90,101 (short | long | prev | next) | ||
| 2000/1021 | pentrackxy(int x, int y) { if (x == -1) { /* pen up. associate with button 1, 2, 3 up */ | |
| 2000/1024 | mouse.buttons &= ~0x7; | |
| 2000/1021 | } else { x = (x<<16)/calibration.scalex + calibration.transx; y = (y<<16)/calibration.scaley + calibration.transy; | |
| 2000/1024 | if ((mouse.buttons & 0x7) == 0) mouse.buttons |= 0x1; | |
| 2000/1021 | } penmousetrack(mouse.buttons, x, y); } | |
| 2000/1021/sys/src/9/bitsy/devpenmouse.c:204,210 – 2000/1024/sys/src/9/bitsy/devpenmouse.c:205,210 | ||
| 2000/1021 | } } | |
| 2000/1021/sys/src/9/bitsy/devpenmouse.c:211,217 – 2000/1024/sys/src/9/bitsy/devpenmouse.c:211,216 | ||
| 2000/1021 | char buf[4*12+1]; static int map[8] = {0, 4, 2, 6, 1, 5, 3, 7 }; Mousestate m; | |
| 2000/1021/sys/src/9/bitsy/devpenmouse.c:239,250 – 2000/1024/sys/src/9/bitsy/devpenmouse.c:238,246 | ||
| 2000/1021 | m = mouse.Mousestate; } | |
| 2000/1024 | m.buttons, | |
| 2000/1021 | m.msec); mouse.lastcounter = m.counter; if(n > 1+4*12) | |
| 2000/1021/sys/src/9/bitsy/devpenmouse.c:303,309 – 2000/1024/sys/src/9/bitsy/devpenmouse.c:299,305 | ||
| 2000/1021 | { char *p; Point pt; | |
| 2000/1024 | char buf[64], *field[5]; | |
| 2000/1021 | int nf, b; p = va; | |
| 2000/1021/sys/src/9/bitsy/devpenmouse.c:319,325 – 2000/1024/sys/src/9/bitsy/devpenmouse.c:315,321 | ||
| 2000/1021 | buf[n-1] = 0; else buf[n] = 0; | |
| 2000/1024 | nf = getfields(buf, field, 5, 1, " "); | |
| 2000/1021 | if(strcmp(field[0], "swap") == 0){ if(mouseswap) setbuttonmap("123"); | |
| 2000/1021/sys/src/9/bitsy/devpenmouse.c:338,344 – 2000/1024/sys/src/9/bitsy/devpenmouse.c:334,341 | ||
| 2000/1021 | calibration.scaley = strtol(field[2], nil, 0); calibration.transx = strtol(field[3], nil, 0); calibration.transy = strtol(field[4], nil, 0); | |
| 2000/1024 | } else print("calibrate %d fields\n", nf); | |
| 2000/1021 | } return n; | |