🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #11637

Updating Mouse Pointer Information

#11637
From: Brian Moffet
Date: Tue, 28 Feb 1989 19:20
56 lines
2440 bytes
A while ago, I asked people about updating the mouse pointer 
in a global way (ie to change it for all windows).

I discovered a method which does work, but will probably break
in future releases of the operating system.  If you are not
interested, please quit out now.



First things first:

	in order to allocate and set up the memory I need for 
	my pointer, I make a call to GetPrefs() to get the current
	preferences.  From this I make a copy of the old mouse 
	pointer so that I can restore it when my program is finished.

	I redo the pointer with my own version, and then call SetPrefs
	to set the whole thing up.  Immediately after this, I save
	the pointer located at IntuitionBase->APointer so that I
	can write to it.  This is a small window where I could have
	problems, but it is really small.

	I figured (correctly it seems) that when intuition needs to
	change the mouse pointer for a particular window, it will
	just swap pointers.  By saving the "known" correct pointer
	I can avoid writing to pointer memory that I should not be 
	writing to.

	Now, at 1 minute intervals, I can just load the pointer 
	that I have saved with a new image.  Thus, I can have a 
	clock in my pointer.    This does seem to work with
	dmouse, but I may end up re-writing my program to do
	the stuff dmouse does for memory savings (though not much).


I will be giving this clock/mouse program to the comp.amiga.sources
people sometime in the future.  That way others can see how
to do this stuff.

Personnally, I would like to see the addition of a system call
to change the global pointer without having to go through preferences.
This would make programs like I am writing much easier and more portable
than they are now.

Thanks to all of the people out there who have made programs and
tips that enable me to do this.

Just FYI.

brian moffet
-- 
Brian Moffet			{uunet,decvax!microsoft,ucscc}!sco!brianm
 -or-				...sco!alar!brian
"I was everything you wanted me to be.  You were afraid, I was frightening."
My fish and company have policies.  I have opinions.
Technical Details
Message-ID: <2365@scolex.sco.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!sco!brianm

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!sco!brianm
From: brianm@sco.COM (Brian Moffet)
Newsgroups: comp.sys.amiga.tech
Subject: Updating Mouse Pointer Information
Keywords: Found a "non-portable method"
Message-ID: <2365@scolex.sco.COM>
Date: 28 Feb 89 19:20:59 GMT
Organization: The Santa Cruz Operation, Inc.
Lines: 56