🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #19390

Re: Cursor Control

#19390
From: David Phillip Oster
Date: Tue, 22 Sep 1987 21:27
29 lines
2181 bytes
In article <sVJ1zsy00UgLwe00=B@andrew.cmu.edu> rj0z+@andrew.cmu.edu (Robert George Johnston, Jr.) writes:
>   Does anybody know how to move the cursor from within an application. (I
>don't mean with the mouse, but by actually changing the coordinates with a
>program). 

Apple _strongly_ recommends that you not do this. Apple has promised
to deimplement the current mechanism for doing this.  The current
mechanism is documented in Inside Macintosh Vol. 1, at the end of the
Event Manager section. This is the section on "journaling", and it is
this mechanism that I used so that my digitizing tablet drivers can
move the mouse cursor.  If it is going to work with arbitrary
programs, you must do a _lot_ of work to patch the ROMs to get around
bugs in people's application programs. Among the programs that had
bugs with this method were early versions of the ImageWriter Printer
driver.

>I also need to know if it is possible to constrain the motion of
>the cursor to a smaller rectangle than the screen.

You can get the seeming of moving the cursor under program control by
calling HideCursor(), and doing your own graphics to do your own mouse
tracking. In general you should do this only under very tightly
constrained circumstances, since it makes living under a multi-tasking
environment painful.


--- David Phillip Oster            --This space for rent.
Arpa: oster@dewey.soe.berkeley.edu --Your message could go here!
Uucp: {uwvax,decvax,ihnp4}!ucbvax!oster%dewey.soe.berkeley.edu
Technical Details
Message-ID: <20906@ucbvax.BERKELEY.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!rutgers!ucla-cs!zen!ucbvax!dewey.soe.berkeley.edu!oster
References: <sVJ1zsy00UgLwe00=B@andrew.cmu.edu>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!rutgers!ucla-cs!zen!ucbvax!dewey.soe.berkeley.edu!oster
From: oster@dewey.soe.berkeley.edu (David Phillip Oster)
Newsgroups: comp.sys.mac
Subject: Re: Cursor Control
Message-ID: <20906@ucbvax.BERKELEY.EDU>
Date: Tue, 22-Sep-87 17:27:49 EDT
Article-I.D.: ucbvax.20906
Posted: Tue Sep 22 17:27:49 1987
Date-Received: Thu, 24-Sep-87 07:03:12 EDT
References: <sVJ1zsy00UgLwe00=B@andrew.cmu.edu>
Sender: usenet@ucbvax.BERKELEY.EDU
Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster)
Organization: School of Education, UC-Berkeley
Lines: 29