Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!rphroy!hobbes.cs.gmr.com!tkacik From: tkacik@hobbes.cs.gmr.com (Tom Tkacik CS/50) Newsgroups: comp.sys.3b1 Subject: Re: Is there a way to track the 3b1 mouse w/o pressing buttons? Message-ID: <57082@rphroy.UUCP> Date: 26 Jun 91 19:43:48 GMT References: <1991Jun26.165203.25919@ecsvax.uncecs.edu> Sender: news@rphroy.UUCP Reply-To: tkacik@hobbes.cs.gmr.com (Tom Tkacik CS/50) Organization: G.M. Research Labs, Warren, MI Lines: 32 Nntp-Posting-Host: hobbes.cs.gmr.com In article <1991Jun26.165203.25919@ecsvax.uncecs.edu>, tcamp@ecsvax.uncecs.edu (Ted A. Campbell) writes: |> |> I am revising my graphics software for the 3b1. This has both |> TAM and MGR interfaces, but under TAM I can't seem to figure how |> to track mouse position without a key on the mouse being pressed. |> I've tried the TAM wreadmouse() call and the more generic |> track() calls, and I've read the documentation on the two |> mouse-related ioctl calls, but neither of them promises to |> be able to read the present position of the mouse. Can anyone |> suggest a way that this can be done? I do not have the documentation on hand, so my details might be wrong. You use the wsetmouse() routine to tell when mouse reports should be given. One of the parameters is a list of conditions, (ie. MSDOWN, MSUP, MSIN, MSOUT). MSOUT means that the mouse should generate a mouse report whenever the mouse is moved outside of a rectangle (whose coordinates are also given in the wsetmouse() routine). Just give the current mouse coordinates. As long as the mouse is not moved it will not generate a report, but if you move it just a little bit, it will. Mouse reports will also be reset. Take the new mouse coordinates and re-issue wsetcommand(). A little bit of thought will show that this does indeed work, (it took me quite a while to understand it). You can look at klondike to see how I implemeted dragging the cards around, (it's the same problem). Grep for MSOUT. Good luck. -- Tom Tkacik GM Research Labs tkacik@hobbes.cs.gmr.com tkacik@kyzyl.mi.org