[comp.sys.mac.programmer] Modifying the mouse input

etsai@hstbme.mit.edu (Eugene Tsai) (09/28/89)

I have a digitizer and want to write some code that would allow the digitizer
to share control of the cursor with the mouse. However, looking through
Inside Mac vols 1-5, I have not found any Toolbox routines that will allow
me to alter the coordinates of the cursor. The digitizer that I have sends
serial data via the Mac's modem port. Does anyone have suggestions as to how
I might accomplish this task?
Thanks,
Eugene Tsai

mnkonar@manyjars.SRC.Honeywell.COM (Murat N. Konar) (09/28/89)

In article <14701@bloom-beacon.MIT.EDU> etsai@hstbme.mit.edu.UUCP (Eugene Tsai) writes:
>I have a digitizer and want to write some code that would allow the digitizer
>to share control of the cursor with the mouse. However, looking through
>Inside Mac vols 1-5, I have not found any Toolbox routines that will allow
>me to alter the coordinates of the cursor. The digitizer that I have sends
>serial data via the Mac's modem port. Does anyone have suggestions as to how
>I might accomplish this task?

I beleive there is some sample code for an ADB tablet 
driver available via anonymous ftp from Apple.  You
should be able to figure out how to move the mouse
from this code.

[the following is a quote from an eariler post]

"To access and retrieve files from the Apple 
archive, you should FTP to apple.apple.com (130.43.2.2) using
account:anonymous and password:guest.  Once you logon, change 
directories to pub/dts/ (cd pub/dts/) and get the README file 
(get README) which explains the archive content and structure."

Good luck.

____________________________________________________________________
Have a day. :^|
Murat N. Konar        Honeywell Systems & Research Center, Camden, MN
mnkonar@SRC.honeywell.com (internet) {umn-cs,ems,bthpyd}!srcsip!mnkonar(UUCP)

yahnke@vms.macc.wisc.edu (Ross Yahnke, MACC) (09/28/89)

In article <14701@bloom-beacon.MIT.EDU> etsai@hstbme.mit.edu.UUCP (Eugene Tsai) writes:
>I have a digitizer and want to write some code that would allow the digitizer
>to share control of the cursor with the mouse. However, looking through

The Hypercard stack "Q & A Stack 3.1" from Apple DTS contains material
that discusses how to modify the movement of the mouse cursor. It's
available via anonymous ftp from sumex and apple.

>>>      Internet: yahnke@macc.wisc.edu        <<<
>>>   Mille voix chuchottent <<c'est vrai>>    <<<

cbm@well.UUCP (Chris Muir) (09/29/89)

Here's the other side of GetMouse, SetMouse:

 procedure SetMouse (where: point);
  var
   LowGlob: integer;
   LowMem: ptr;
   PointPtr: ^point;
   finalTicks: longint;
  const
    {some dangerous low-memory-global equates}
   MBState = $172;      {byte}
   MTemp = $828;        {point}
   RawMouse = $82c;     {point}
   Mouse = $830;        {point}
   CrsrNew = $8ce;      {byte}
   CrsrCouple = $8cf;   {byte}
   Couple = $ff;        {value for CrsrCouple}
   Uncouple = $00;      {value for CrsrCouple}
 begin
  LocalToGlobal(where);             {Get ready to restore old mouse position}
  LowMem := pointer(RawMouse);      {point to low memory}
  PointPtr := @LowMem^;             {treat it as a point}
  PointPtr^ := where;               {store saved mouse position into it}
  LowMem := pointer(MTemp);         {point to low memory}
  PointPtr := @LowMem^;             {treat it as a point}
  PointPtr^ := where;               {store saved mouse position into it}
  LowMem := pointer(CrsrNew);
  LowMem^ := $ffff;                 {both CrsrNew & CrsrCouple}
  Delay(5, finalTicks);             {let the cursor catch up}
 end;       {SetMouse}


Note thet it uses undocumented low memory globals.


-- 
_______________________________________________________________________________
Chris Muir                             |   "There is no language in our lungs
{hplabs,pacbell,ucbvax,apple}          |    to tell the world just how we feel" 
!well!cbm                              |                         - A. Partridge