High Level Toolkit -- is it obsolete or not?
High Level Toolkit -- is it obsolete or not?
- Subject: High Level Toolkit -- is it obsolete or not?
- From: Joel May <email@hidden>
- Date: Mon, 22 Feb 2010 13:53:38 -0600
I'm porting an application from Carbon to Cocoa. There are a few things in it that I'm having problems finding the cocoa equivalent.
The app is a music education product for kids. They have to tap the rhythm on the spacebar or the mouse button in parts of the program -- i.e. precise timing is very important. In the carbon version, I use GetMouse(), GetButton(), GetKeys(), etc. inside an interrupt (PrimeTime()).
I can use NSView functions mouseDown, keyDown, etc. but the timing is not always sufficiently precise. This is especially true when the entire window is updated and
I would like to create a thread (NSThread) with a bumped-up priority and poll the mouse and keyboard the same way I did in the carbon version. I'd like to use the cocoa equivalents of GetButton() and GetKeys() but I can't find them.
What puzzles me is that GetKeys() still exists in 10.6. It is not deprecated. It runs fine in 64bit mode. Also, GetMouse() and GetButton() have updated equivalents as HiGetMousePosition() and GetCurrentEventButtonState(). These functions are part of the 'High Level Toolkit'.
The Carbon64BitGuide.pdf explains how the carbon api's have been updated for 64 bit. But I thought carbon was dead in 64 bit and Snow Leopard. What is the deal? Am I safe using these api's. Are we supposed to not use them? Will they go away in 10.7? Why do I read everywhere that carbon is dead and high level toolkit is dead?
If High Level Toolkit is ok, then why doesn't it appear in the docs. If I search the Mac OS X Reference Library, it does not get the same treatment that the cocoa api gets. The only place I see the High Level Toolkit is in the Carbon64BitGuide.pdf and the header files and some cruddy api update doc.
Is there a way to poll the state of the hardware using cocoa api's instead of the carbon api's?
(Please don't tell me how cocoa is great and carbon is for losers. I'm on board with the cocoa thing.)
Thanks,
Joel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden