Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create a custom cursor using Carbon ?



Eric Schlegel wrote:

As far as I can tell, NSCursor is Cocoa, so no good for my C only code,

Any particular reason? You can compile your C code with the ObjC compiler and thereby call ObjC APIs, and if your code really isn't compatible with ObjC (say you use variables named "id"), then you could just put the ObjC code into a separate source file.

Cross platform compatibility, historical reasons, and simplicity. If I mix in any other language, it will be C++ to be able to use WxWidgets, again for cross platform compatibility.

So if you're just trying to hide the cursor, is there any reason you can't just call HideCursor or CGDisplayHideCursor?

No, but I was hoping that setting an invisible cursor in QD might operate differently. It doesn't.

I do hope the new Carbon API is a little smarter, and allows setting
cursors as a window attribute ...

We will keep that in mind (although it's more likely we'll provide an API that allows you to set a cursor as an HIView attribute. You could always pass the window's root view to cover the entire window.)

Sounds overly complicated for something so simple on other platforms, but I assume this is more flexible.

At least disabling the screensaver and powersaver was easy :-)

Graeme Gill.

_______________________________________________
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

This email sent to email@hidden
References: 
 >How to create a custom cursor using Carbon ? (From: Graeme Gill <email@hidden>)
 >Re: How to create a custom cursor using Carbon ? (From: Eric Schlegel <email@hidden>)
 >Re: How to create a custom cursor using Carbon ? (From: Graeme Gill <email@hidden>)
 >Re: How to create a custom cursor using Carbon ? (From: Eric Schlegel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.