After searching for some considerable time on developer.apple.com,
I'm unable to locate the Carbon API's for setting a custom
cursor for a window. Deprecated QuickDraw functions, and
Cocoa functions I've found, but not Carbon. Do they exist ?
It appears not. Not yet, at any rate. (Ah, I see Eric responded
already.) Here's the sequence of calls we use:
NewGWorld() with the desired dimensions, probably with bits per pixel
== 32.
Draw into the GWorld -- I used QDBeginCGContext to use CoreGraphics.
GetGWorldPixMap to retrieve a PixMap from the GWorld.
QDRegisterNamedPixMap
DisposeGWorld
The trickiest part for us, actually, was making this per-window, as
Eric mentioned. The technique I used was to set the name of the
current cursor to be used on the window using SetWindowProperty, and
then to check this property and respond appropriately during each
mouse event at any window. (Note that it may be wise for you to use
QDIsNamedPixMapCursorRegistered at this time if you may tear down the
cursor before removing it from all windows using it.)
Hope that helps.
Damian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden