Move cursor with code?

Michael Rueger m.rueger at acm.org
Wed Jun 7 07:21:57 UTC 2006


Tom Phoenix wrote:
> On 6/6/06, Marcus Pedersén <marcus.pedersen at comhem.se> wrote:
> 
>> How do I move the cursor with code to a specific point?
> 
> 
> I don't believe that Squeak VMs (by default, at least) include any
> support for affecting the mouse position of the underlying system.

Well, one of my favorite "what the hell was the person thinking" gripes...

primCursorLocPut: aPoint
	"If the primitive fails, try again with a rounded point."

	<primitive: 91>
	^ self primCursorLocPutAgain: aPoint rounded


Only that the primitive got abused for something else:

supportsDisplayDepth: pixelDepth
	"Return true if this pixel depth is supported on the current host platform.
	Primitive. Optional."
	<primitive: 91>
	^#(1 2 4 8 16 32) includes: pixelDepth

causing the need for custom ffi calls on platforms now. Somebody at 
impara actually went through the effort, we should have that code 
somewhere, I think...

Michael



More information about the Squeak-dev mailing list