Path: utzoo!mnetor!uunet!husc6!mailrus!nrl-cmf!ames!oliveb!amiga!jimm
From: jimm@amiga.UUCP (Jim Mackraz)
Newsgroups: comp.sys.amiga
Subject: Re: Finishing up YAIP (Yet Another Input Handler), Need info.
Message-ID: <2087@amiga.UUCP>
Date: 10 May 88 18:28:46 GMT
References: <8805090351.AA04051@cory.Berkeley.EDU> <5918@well.UUCP>
Reply-To: jimm@cloyd.UUCP (Jim Mackraz)
Organization: Commodore-Amiga Inc, Los Gatos CA
Lines: 73

In article <5918@well.UUCP> ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) writes:
)In article <8805090351.AA04051@cory.Berkeley.EDU> dillon@CORY.BERKELEY.EDU (Matt Dillon) writes:
)>	After looking at and rejecting several mouse-intuition input
)>handler enhancers (you know, accelerate the mouse, click-to-front, etc...)
)>and finding them ALL useless, I have written my own.

As an input handler writer, I'd be interested in hearing what you think
the problems are, or is it that they don't support your long list of
features?

)>Before I release it,
)>though, I need information on how to clear the intuition pointer sprite...
)>as in turn it off after some timeout, then restore it when the mouse is
)>moved.
)>
)>	* I have tried GetPrefs()/SetPrefs().  This works, but has some
)>	  nasty side effects, like propogating keyboard input to ALL
)>	  console devices for a short period after you SetPrefs().
)>
)	Sounds like a bug to me, and should be reported if it hasn't
)already.

I've mailed it in.  Please mail bugs to cbmvax!bugs, Matt.  Now is the
time, and your contributions are important.  thnx.

)	At the risk of incurring the most Powerful and Awful Wrath of Jim
)Mackraz, I would suggest fiddling around with IntuitionBase.

Wrath?  No wrath here, but my little joke about your system-programming
sensibilities is getting a little less funny ;^) 

)	I picked through there once, and found a SimpleSprite structure
)which I presumed to be the structure that managed the default Intuition
)pointer.  "Logic would suggest" that all you need to do is fiddle with it,
)pointing it to a blank sprite.

Will not work in future releases of the OS, and maybe not the current one.

)	The other thing you could do is to create a user copper list whose
)sole purpose in life is to turn off sprite DMA for sprite channel 0. 

Sounds interesting.

I put an example on the DevCon disks of an input stealer that uses sprite 0
and gives it back.  It grabs it by saying ChangeSprite() or MoveSprite()
and by being careful to deny Intuition() of all input, so (in most cases)
Intuition will not ChangeSprite() or MoveSprite() which grabs it back.
In my example, saying SetPointer() or ClearPointer() immediately causes
Intuition to call ChangeSprite(), which reappears the normal mouse pointer,
because my window is active at the time of the call.

In your case, half of this might work: you can ChangeSprite() to whatever
(something invisible?) and deny Intuition input.  Sprite gone.  To reappear,
if you have a window, call ClearPointer().  Else, when the mouse is
moved (which you can force from an input handler, by the way) the Intuition
call to MoveSprite() will do the trick.  Send mail if you need details,
and let me know more about this propogation of keystrokes business.  First
glances at our end (no attempt at reproducing yet) make it hard to imagine
how it happens.

By the way, it is probably not a good idea for programs to call Intuition
functions (such as SetPrefs) from an input handler.  I can identify problems
that might occur with locking, and there are probably others.  My
intuition helper (IHelp) has input device signal or message a normal
application task which calls Intuition for move windows and so on.  I bet 
yours does the same.

	jimm
-- 
	Jim Mackraz, I and I Computing	  
	amiga!jimm	BIX:jmackraz
Opinions are my own.  Comments regarding the Amiga operating system, and
all others, are NOT to be taken as Commodore official policy.