brad@bradley.UUCP (11/24/87)
I have been playing with track and noticed on my machine, that if I move the mouse slowly track doesn't pick up the motion. It picks up all the key clicks and sudden movements but not the gentle ones. Anyone know why? I have included the source to a test program. Bradley Smith UUCP: {cepu,ihnp4,noao,uiucdcs}!bradley!brad Text Processing ARPA: cepu!bradley!brad@CS.UCLA Bradley University PH: (309) 677-2337 Peoria, IL 61625 ============================cut here======================= #include <stdio.h> #include <tam.h> #include <track.h> #include <signal.h> #include <kcodes.h> tkitem_t items[] = { { 0, 0, 300, 300, 0, 0}, { 0, 0, 0, 0, 0, 0} }; sigint() { wexit(0); } main() { int wtam, xp, yp, bp, rp; /* value from winit */ struct umdata um; int ret_wgetc, error; extern int sigint(); track_t trk; signal(SIGINT, sigint); trk.t_flags = MSUP|MSDOWN; trk.t_scalex = trk.t_scaley = 1; trk.t_bicon = 0; /* don't set */ trk.t_tkitems = items; trk.t_curi = &items[0]; winit(); wtam = wcreate(0,0,24,80, BORDHELP|BORDRESIZE|BORDCANCEL); error = track(wtam, &trk, T_BEGIN, &bp, &rp); if(error == -1) { perror("track:T_BEGIN"); wexit(0); } keypad(0,1); /* put in 8bit mode */ for(;;) { error = track(wtam, &trk, T_INPUT, &bp, &rp); if(error == -1) { perror("track:T_INPUT"); wexit(0); } printf("%d/%d - %o - %o\r\n", trk.t_lastx, trk.t_lasty, bp, rp); if(bp == 0377777) sigint(); } }